pub trait SineEstimator {
    // Required method
    fn model_sine(
        &self,
        predictors: &[f64],
        outcomes: &[f64],
        max_frequency: f64
    ) -> SineCoefficients;

    // Provided method
    fn boxed_sine(self) -> Box<dyn SineEstimator>
       where Self: Sized + 'static { ... }
}
Available on crate feature regression only.
Expand description

Implemented by all estimators yielding a sine wave.

Required Methods§

source

fn model_sine( &self, predictors: &[f64], outcomes: &[f64], max_frequency: f64 ) -> SineCoefficients

Model the SineCoefficients from predictors and outcomes.

Panics

The two slices must have the same length.

Provided Methods§

source

fn boxed_sine(self) -> Box<dyn SineEstimator>where Self: Sized + 'static,

Put this estimator in a box. This is useful for conditionally choosing different estimators.

Implementations on Foreign Types§

source§

impl<T: SineEstimator + ?Sized> SineEstimator for &T

source§

fn model_sine( &self, predictors: &[f64], outcomes: &[f64], max_frequency: f64 ) -> SineCoefficients

Implementors§

source§

impl SineEstimator for std_dev::regression::binary_search::Options

source§

impl SineEstimator for std_dev::regression::spiral::Options