Skip to main content

Sample

Trait Sample 

Source
pub trait Sample {
    // Required method
    fn sample(&self, rng: &mut SplitMix64) -> f64;
}
Expand description

Draws a single variate from a seeded, reproducible RNG.

Required Methods§

Source

fn sample(&self, rng: &mut SplitMix64) -> f64

Draws one variate, advancing rng.

§Arguments
  • rng — the deterministic generator; a fixed seed yields a fixed stream.
§Returns

A single draw from the distribution.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§