Struct uncertain::Distribution [−][src]
Wraps a rand::distributions::Distribution
to create uncertain
values from probability distributions and ensure they have the
correct Copy
and Clone
semantics.
Implementations
impl<T, D> Distribution<T, D> where
D: Distribution<T>,
[src]
D: Distribution<T>,
pub fn from(dist: D) -> Self
[src]
Construct a new impl Uncertain
from a
distribution.
Trait Implementations
impl<T, D> From<D> for Distribution<T, D> where
D: Distribution<T>,
[src]
D: Distribution<T>,
impl<T, D> Uncertain for Distribution<T, D> where
D: Distribution<T>,
[src]
D: Distribution<T>,
type Value = T
The type of the contained value.
fn sample<R: Rng>(&self, rng: &mut R, _epoch: usize) -> Self::Value
[src]
fn pr(&self, probability: f32) -> bool where
Self::Value: Into<bool>,
[src]
Self::Value: Into<bool>,
fn pr_with<R: Rng>(&self, rng: &mut R, probability: f32) -> bool where
Self::Value: Into<bool>,
[src]
Self::Value: Into<bool>,
fn into_boxed(self) -> BoxedUncertain<Self> where
Self: 'static + Sized,
Self::Value: Clone,
[src]
Self: 'static + Sized,
Self::Value: Clone,
fn map<O, F>(self, func: F) -> Map<Self, F> where
Self: Sized,
F: Fn(Self::Value) -> O,
[src]
Self: Sized,
F: Fn(Self::Value) -> O,
fn join<O, U, F>(self, other: U, func: F) -> Join<Self, U, F> where
Self: Sized,
U: Uncertain,
F: Fn(Self::Value, U::Value) -> O,
[src]
Self: Sized,
U: Uncertain,
F: Fn(Self::Value, U::Value) -> O,
fn not(self) -> Not<Self> where
Self: Sized,
Self::Value: Into<bool>,
[src]
Self: Sized,
Self::Value: Into<bool>,
fn and<U>(self, other: U) -> And<Self, U> where
Self: Sized,
Self::Value: Into<bool>,
U: Uncertain,
U::Value: Into<bool>,
[src]
Self: Sized,
Self::Value: Into<bool>,
U: Uncertain,
U::Value: Into<bool>,
fn or<U>(self, other: U) -> Or<Self, U> where
Self: Sized,
Self::Value: Into<bool>,
U: Uncertain,
U::Value: Into<bool>,
[src]
Self: Sized,
Self::Value: Into<bool>,
U: Uncertain,
U::Value: Into<bool>,
fn add<U>(self, other: U) -> Sum<Self, U> where
Self: Sized,
U: Uncertain,
Self::Value: Add<U::Value>,
[src]
Self: Sized,
U: Uncertain,
Self::Value: Add<U::Value>,
fn sub<U>(self, other: U) -> Difference<Self, U> where
Self: Sized,
U: Uncertain,
Self::Value: Sub<U::Value>,
[src]
Self: Sized,
U: Uncertain,
Self::Value: Sub<U::Value>,
fn mul<U>(self, other: U) -> Product<Self, U> where
Self: Sized,
U: Uncertain,
Self::Value: Mul<U::Value>,
[src]
Self: Sized,
U: Uncertain,
Self::Value: Mul<U::Value>,
fn div<U>(self, other: U) -> Ratio<Self, U> where
Self: Sized,
U: Uncertain,
Self::Value: Div<U::Value>,
[src]
Self: Sized,
U: Uncertain,
Self::Value: Div<U::Value>,
Auto Trait Implementations
impl<T, D> RefUnwindSafe for Distribution<T, D> where
D: RefUnwindSafe,
T: RefUnwindSafe,
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, D> Send for Distribution<T, D> where
D: Send,
T: Send,
D: Send,
T: Send,
impl<T, D> Sync for Distribution<T, D> where
D: Sync,
T: Sync,
D: Sync,
T: Sync,
impl<T, D> Unpin for Distribution<T, D> where
D: Unpin,
T: Unpin,
D: Unpin,
T: Unpin,
impl<T, D> UnwindSafe for Distribution<T, D> where
D: UnwindSafe,
T: UnwindSafe,
D: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,