Struct relearn::utils::distributions::Deterministic
source · [−]pub struct Deterministic<T>(_);
Expand description
A determistic distribution.
Always produces the same value when sampled.
Implementations
sourceimpl<T> Deterministic<T>
impl<T> Deterministic<T>
Trait Implementations
sourceimpl Bounded<f64> for Deterministic<f64>
impl Bounded<f64> for Deterministic<f64>
sourceimpl<T: Clone> Clone for Deterministic<T>
impl<T: Clone> Clone for Deterministic<T>
sourcefn clone(&self) -> Deterministic<T>
fn clone(&self) -> Deterministic<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<T: Debug> Debug for Deterministic<T>
impl<T: Debug> Debug for Deterministic<T>
sourceimpl<T: Default> Default for Deterministic<T>
impl<T: Default> Default for Deterministic<T>
sourcefn default() -> Deterministic<T>
fn default() -> Deterministic<T>
Returns the “default value” for a type. Read more
sourceimpl<T: Copy> Distribution<T> for Deterministic<T>
impl<T: Copy> Distribution<T> for Deterministic<T>
sourcefn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> T
fn sample<R: Rng + ?Sized>(&self, _rng: &mut R) -> T
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<T> FromMean<T> for Deterministic<T>
impl<T> FromMean<T> for Deterministic<T>
sourceimpl<T: Hash> Hash for Deterministic<T>
impl<T: Hash> Hash for Deterministic<T>
sourceimpl<T: PartialEq> PartialEq<Deterministic<T>> for Deterministic<T>
impl<T: PartialEq> PartialEq<Deterministic<T>> for Deterministic<T>
sourcefn eq(&self, other: &Deterministic<T>) -> bool
fn eq(&self, other: &Deterministic<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Deterministic<T>) -> bool
fn ne(&self, other: &Deterministic<T>) -> bool
This method tests for !=
.
impl<T: Copy> Copy for Deterministic<T>
impl<T: Eq> Eq for Deterministic<T>
impl<T> StructuralEq for Deterministic<T>
impl<T> StructuralPartialEq for Deterministic<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Deterministic<T> where
T: RefUnwindSafe,
impl<T> Send for Deterministic<T> where
T: Send,
impl<T> Sync for Deterministic<T> where
T: Sync,
impl<T> Unpin for Deterministic<T> where
T: Unpin,
impl<T> UnwindSafe for Deterministic<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.