[][src]Struct markovian::FiniteMarkovChain

pub struct FiniteMarkovChain<T, W, R> where
    W: Weight,
    Uniform<W>: Debug + Clone,
    R: Rng
{ /* fields omitted */ }

Finite state Markov Chain in discrete time.

Costs

Construction cost: O(n), n: size of the state space. Sample cost: O(1).

Implementations

impl<T, W, R> FiniteMarkovChain<T, W, R> where
    W: Weight,
    Uniform<W>: Debug + Clone,
    R: Rng
[src]

pub fn new(
    state_index: usize,
    transition_matrix: Vec<WeightedIndex<W>>,
    state_space: Vec<T>,
    rng: R
) -> Self
[src]

Trait Implementations

impl<T: Clone, W: Clone, R: Clone> Clone for FiniteMarkovChain<T, W, R> where
    W: Weight,
    Uniform<W>: Debug + Clone,
    R: Rng
[src]

impl<T: Debug, W: Debug, R: Debug> Debug for FiniteMarkovChain<T, W, R> where
    W: Weight,
    Uniform<W>: Debug + Clone,
    R: Rng
[src]

impl<T, W, R> Distribution<T> for FiniteMarkovChain<T, W, R> where
    W: Weight,
    Uniform<W>: Debug + Clone,
    T: Debug + PartialEq + Clone,
    R: Rng
[src]

fn sample<R2: ?Sized>(&self, rng: &mut R2) -> T where
    R2: Rng
[src]

Sample a possible next state.

impl<T, W, R> Iterator for FiniteMarkovChain<T, W, R> where
    W: Weight,
    Uniform<W>: Debug + Clone,
    T: Debug + PartialEq + Clone,
    R: Rng
[src]

type Item = T

The type of the elements being iterated over.

impl<T, W, R> State for FiniteMarkovChain<T, W, R> where
    W: Weight,
    Uniform<W>: Debug + Clone,
    T: Debug + PartialEq + Clone,
    R: Rng
[src]

type Item = T

impl<T, W, R> StateIterator for FiniteMarkovChain<T, W, R> where
    W: Weight,
    Uniform<W>: Debug + Clone,
    T: Debug + PartialEq + Clone,
    R: Rng
[src]

Auto Trait Implementations

impl<T, W, R> RefUnwindSafe for FiniteMarkovChain<T, W, R> where
    R: RefUnwindSafe,
    T: RefUnwindSafe,
    W: RefUnwindSafe,
    <W as SampleUniform>::Sampler: RefUnwindSafe

impl<T, W, R> Send for FiniteMarkovChain<T, W, R> where
    R: Send,
    T: Send,
    W: Send,
    <W as SampleUniform>::Sampler: Send

impl<T, W, R> Sync for FiniteMarkovChain<T, W, R> where
    R: Sync,
    T: Sync,
    W: Sync,
    <W as SampleUniform>::Sampler: Sync

impl<T, W, R> Unpin for FiniteMarkovChain<T, W, R> where
    R: Unpin,
    T: Unpin,
    W: Unpin,
    <W as SampleUniform>::Sampler: Unpin

impl<T, W, R> UnwindSafe for FiniteMarkovChain<T, W, R> where
    R: UnwindSafe,
    T: UnwindSafe,
    W: UnwindSafe,
    <W as SampleUniform>::Sampler: 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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<I> IteratorRandom for I where
    I: Iterator
[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>,