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§
Sourcefn compute(&self, x: &[f64], y: &[f64]) -> Result<f64, MultivariateError>
fn compute(&self, x: &[f64], y: &[f64]) -> Result<f64, MultivariateError>
Compute the correlation coefficient between two equal-length slices.
Sourcefn supports_incremental(&self) -> bool
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".