Skip to main content

CorrelationMethod

Trait CorrelationMethod 

Source
pub trait CorrelationMethod: Send + Sync {
    // Required methods
    fn compute(&self, x: &[f64], y: &[f64]) -> Result<f64, MultivariateError>;
    fn supports_incremental(&self) -> bool;
}
Expand description

Common trait for pairwise correlation methods.

Required Methods§

Source

fn compute(&self, x: &[f64], y: &[f64]) -> Result<f64, MultivariateError>

Compute the correlation coefficient between two equal-length slices.

Source

fn supports_incremental(&self) -> bool

Whether this method supports incremental (online) updates.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§