UnivariateKDE

Trait UnivariateKDE 

Source
pub trait UnivariateKDE<B, K, F: KDEFloat>: Sealed {
    // Required methods
    fn new<T: Into<Vec<F>>>(observations: T, bandwidth: B, kernel: K) -> Self;
    fn pdf(&self, dataset: &[F]) -> Vec<F>;
    fn cdf(&self, dataset: &[F]) -> Vec<F>;
    fn sample(&self, dataset: &[F], n_samples: usize) -> Vec<F>;
}

Required Methods§

Source

fn new<T: Into<Vec<F>>>(observations: T, bandwidth: B, kernel: K) -> Self

Source

fn pdf(&self, dataset: &[F]) -> Vec<F>

Source

fn cdf(&self, dataset: &[F]) -> Vec<F>

Source

fn sample(&self, dataset: &[F], n_samples: usize) -> Vec<F>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<B, K, F: KDEFloat> UnivariateKDE<B, K, F> for KernelDensityEstimator<Vec<F>, B, K>
where B: Bandwidth<F>, K: Kernel<F>,