pub trait SampleSpace: NonEmptySpace {
    fn sample(&self, rng: &mut dyn RngCore) -> Self::Element;
}
Expand description

A space from which samples can be drawn.

No particular distribution is specified but the distribution:

  • must have support equal to the entire space, and
  • should be some form of reasonable “standard” distribution for the space.

Note

This re-implements sample method of Distribution rather than set Distribution<Self::Element> as a super-trait so that SampleSpace is object-safe since

Required Methods

Sample a random element.

Implementors