pub struct GaussPhiK { /* private fields */ }Expand description
Parameters of a Gaussian potential.
Implementations§
Source§impl GaussPhiK
impl GaussPhiK
Sourcepub fn new(k: Array2<f64>, h: Array1<f64>, g: f64) -> Self
pub fn new(k: Array2<f64>, h: Array1<f64>, g: f64) -> Self
Creates a new Gaussian potential with the given parameters.
§Arguments
k- Precision matrix |X| x |X|.h- Information vector |X|.g- Log-normalization constant.
§Panics
- Panics if
kis not square and symmetric. - Panics if the length of
hdoes not match the size ofk. - Panics if
k,h, orgcontain non-finite values.
§Results
A new Gaussian potential instance.
Sourcepub const fn precision_matrix(&self) -> &Array2<f64>
pub const fn precision_matrix(&self) -> &Array2<f64>
Sourcepub const fn information_vector(&self) -> &Array1<f64>
pub const fn information_vector(&self) -> &Array1<f64>
Sourcepub const fn log_normalization_constant(&self) -> f64
pub const fn log_normalization_constant(&self) -> f64
Trait Implementations§
Source§impl AbsDiffEq for GaussPhiK
impl AbsDiffEq for GaussPhiK
Source§fn default_epsilon() -> Self::Epsilon
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
Source§fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
fn abs_diff_eq(&self, other: &Self, epsilon: Self::Epsilon) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
Source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq.Source§impl RelativeEq for GaussPhiK
impl RelativeEq for GaussPhiK
Source§fn default_max_relative() -> Self::Epsilon
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
Source§fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_eq( &self, other: &Self, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
A test for equality that uses a relative comparison if the values are far apart.
Source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
The inverse of
RelativeEq::relative_eq.Auto Trait Implementations§
impl Freeze for GaussPhiK
impl RefUnwindSafe for GaussPhiK
impl Send for GaussPhiK
impl Sync for GaussPhiK
impl Unpin for GaussPhiK
impl UnwindSafe for GaussPhiK
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