pub struct NoiseCov {
pub diag: bool,
/* private fields */
}Expand description
Noise covariance matrix.
Can be a full [n_channels, n_channels] matrix or a diagonal vector.
§Construction
- Directly:
NoiseCov::fullorNoiseCov::diagonal. - From data:
covariance::compute_covarianceorcovariance::compute_covariance_epochs.
Fields§
§diag: boolIf true, data is [n, 1] (diagonal elements only).
Implementations§
Source§impl NoiseCov
impl NoiseCov
Sourcepub fn diagonal(variances: Vec<f64>) -> Self
pub fn diagonal(variances: Vec<f64>) -> Self
Create from diagonal variances (channel noise powers).
Sourcepub fn n_channels(&self) -> usize
pub fn n_channels(&self) -> usize
Number of channels.
Sourcepub fn to_full(&self) -> Array2<f64>
pub fn to_full(&self) -> Array2<f64>
Return the full covariance matrix (expanding diagonal if needed).
Sourcepub fn diag_elements(&self) -> Array1<f64>
pub fn diag_elements(&self) -> Array1<f64>
Return the diagonal elements (channel variances).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NoiseCov
impl RefUnwindSafe for NoiseCov
impl Send for NoiseCov
impl Sync for NoiseCov
impl Unpin for NoiseCov
impl UnsafeUnpin for NoiseCov
impl UnwindSafe for NoiseCov
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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