pub struct MatrixNormal { /* private fields */ }Expand description
Matrix normal distribution over real matrices.
Implementations§
Source§impl MatrixNormal
impl MatrixNormal
Sourcepub fn new(
mean: DMatrix<f64>,
row_cov: DMatrix<f64>,
col_cov: DMatrix<f64>,
) -> Result<MatrixNormal, String>
pub fn new( mean: DMatrix<f64>, row_cov: DMatrix<f64>, col_cov: DMatrix<f64>, ) -> Result<MatrixNormal, String>
Construct a matrix normal distribution with mean matrix mean, row
covariance row_cov, and column covariance col_cov.
§Errors
Returns Err if covariance dimensions do not match the mean or either
covariance is not symmetric positive-definite.
Trait Implementations§
Source§impl Display for MatrixNormal
impl Display for MatrixNormal
Source§impl<R: Rng + ?Sized> Distribution<R> for MatrixNormal
impl<R: Rng + ?Sized> Distribution<R> for MatrixNormal
Source§type Domain = Matrix<f64, Dyn, Dyn, VecStorage<f64, Dyn, Dyn>>
type Domain = Matrix<f64, Dyn, Dyn, VecStorage<f64, Dyn, Dyn>>
The type of values produced by this distribution.
Source§fn log_prob(&self, x: &DMatrix<f64>) -> f64
fn log_prob(&self, x: &DMatrix<f64>) -> f64
Compute the log probability (discrete) or log probability density
(continuous) of observing
x under this distribution. Read moreSource§fn is_discrete(&self) -> bool
fn is_discrete(&self) -> bool
Auto Trait Implementations§
impl Freeze for MatrixNormal
impl RefUnwindSafe for MatrixNormal
impl Send for MatrixNormal
impl Sync for MatrixNormal
impl Unpin for MatrixNormal
impl UnsafeUnpin for MatrixNormal
impl UnwindSafe for MatrixNormal
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.