Trait hyperopt::kernel::Sample

source ·
pub trait Sample<T> {
    // Required method
    fn sample(&self, rng: &mut Rng) -> T;
}
Expand description

Sampler from kernel function.

Required Methods§

source

fn sample(&self, rng: &mut Rng) -> T

Generate a random sample.

Implementors§

source§

impl<K, P> Sample<P> for Component<K, P>
where K: Sample<P>, P: Add<Output = P> + Copy + Mul<Output = P>,

source§

impl<P> Sample<P> for Epanechnikov
where P: Mul<Output = P> + UnsafeFromPrimitive<f64>,

source§

impl<P> Sample<P> for Gaussian
where P: UnsafeFromPrimitive<f64>,

source§

impl<P> Sample<P> for Uniform
where P: Add<Output = P> + Mul<Output = P> + UnsafeFromPrimitive<f64>,

source§

impl<P, D> Sample<P> for Binomial<P, D>
where P: Copy + Debug + UnsafeInto<D> + Integer, D: UnsafeFromPrimitive<f64> + Float,

source§

impl<T, C> Sample<Option<T>> for KernelDensityEstimator<C>
where C: Iterator + Clone, C::Item: Sample<T>,