[][src]Struct markovian::distributions::Unary

pub struct Unary<S, T, F, D> where
    F: Fn(S) -> T,
    D: Distribution<S>, 
{ /* fields omitted */ }

Concrete struct for the function of a `Distribution.

Examples

The squared of a exponential.

let exp_squared = Unary::new(|x: f64| x.powi(2_i32),  Exp1);

Implementations

impl<S, T, F, D> Unary<S, T, F, D> where
    F: Fn(S) -> T,
    D: Distribution<S>, 
[src]

pub fn new(func: F, distr: D) -> Self[src]

Trait Implementations

impl<S: Clone, T: Clone, F: Clone, D: Clone> Clone for Unary<S, T, F, D> where
    F: Fn(S) -> T,
    D: Distribution<S>, 
[src]

impl<S: Copy, T: Copy, F: Copy, D: Copy> Copy for Unary<S, T, F, D> where
    F: Fn(S) -> T,
    D: Distribution<S>, 
[src]

impl<S: Debug, T: Debug, F: Debug, D: Debug> Debug for Unary<S, T, F, D> where
    F: Fn(S) -> T,
    D: Distribution<S>, 
[src]

impl<S, T, F, D> Distribution<T> for Unary<S, T, F, D> where
    F: Fn(S) -> T,
    D: Distribution<S>, 
[src]

Auto Trait Implementations

impl<S, T, F, D> RefUnwindSafe for Unary<S, T, F, D> where
    D: RefUnwindSafe,
    F: RefUnwindSafe,
    S: RefUnwindSafe,
    T: RefUnwindSafe

impl<S, T, F, D> Send for Unary<S, T, F, D> where
    D: Send,
    F: Send,
    S: Send,
    T: Send

impl<S, T, F, D> Sync for Unary<S, T, F, D> where
    D: Sync,
    F: Sync,
    S: Sync,
    T: Sync

impl<S, T, F, D> Unpin for Unary<S, T, F, D> where
    D: Unpin,
    F: Unpin,
    S: Unpin,
    T: Unpin

impl<S, T, F, D> UnwindSafe for Unary<S, T, F, D> where
    D: UnwindSafe,
    F: UnwindSafe,
    S: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,