pub struct GaussianSite {
pub variable: String,
pub precision: f64,
pub precision_mean: f64,
}Expand description
Gaussian site approximation for continuous variables.
In the Gaussian case, sites are parameterized by natural parameters (precision, precision-weighted mean).
Fields§
§variable: StringVariable name
precision: f64Precision (inverse variance)
precision_mean: f64Precision-weighted mean (precision × mean)
Implementations§
Source§impl GaussianSite
impl GaussianSite
Sourcepub fn new(variable: String, precision: f64, precision_mean: f64) -> Self
pub fn new(variable: String, precision: f64, precision_mean: f64) -> Self
Create a new Gaussian site with given parameters.
Sourcepub fn product(&self, other: &GaussianSite) -> Self
pub fn product(&self, other: &GaussianSite) -> Self
Product of two Gaussian sites (in natural parameterization).
Sourcepub fn divide(&self, other: &GaussianSite) -> Self
pub fn divide(&self, other: &GaussianSite) -> Self
Division of two Gaussian sites (in natural parameterization).
Trait Implementations§
Source§impl Clone for GaussianSite
impl Clone for GaussianSite
Source§fn clone(&self) -> GaussianSite
fn clone(&self) -> GaussianSite
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GaussianSite
impl RefUnwindSafe for GaussianSite
impl Send for GaussianSite
impl Sync for GaussianSite
impl Unpin for GaussianSite
impl UnwindSafe for GaussianSite
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more