pub struct Correlation {
pub cross: C64,
pub energy_a: f64,
pub energy_b: f64,
}Expand description
The cross-correlation of two sequences and their energies (see the module).
Fields§
§cross: C64$\sum_{k} a_{k} b_{k}^{*}$.
energy_a: f64$\sum_{k} |a_{k}|^{2}$.
energy_b: f64$\sum_{k} |b_{k}|^{2}$.
Implementations§
Source§impl Correlation
impl Correlation
Sourcepub fn between(a: &[C64], b: &[C64]) -> Correlation
pub fn between(a: &[C64], b: &[C64]) -> Correlation
The correlation of a with b (the pairs of the shorter of the two).
Sourcepub fn rho(&self) -> f64
pub fn rho(&self) -> f64
The normalised correlation $\rho = |c| / \sqrt{E_{a} E_{b}}$, 0 when a sequence has no energy.
Sourcepub fn rho_squared(&self) -> f64
pub fn rho_squared(&self) -> f64
Its square $\rho^{2} = |c|^{2} / (E_{a} E_{b})$ (computed as such, not as the square
of Correlation::rho), 0 when a sequence has no energy.
Trait Implementations§
Source§impl Clone for Correlation
impl Clone for Correlation
impl Copy for Correlation
Source§impl Debug for Correlation
impl Debug for Correlation
Source§impl PartialEq for Correlation
impl PartialEq for Correlation
impl StructuralPartialEq for Correlation
Auto Trait Implementations§
impl Freeze for Correlation
impl RefUnwindSafe for Correlation
impl Send for Correlation
impl Sync for Correlation
impl Unpin for Correlation
impl UnsafeUnpin for Correlation
impl UnwindSafe for Correlation
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