[][src]Trait markovian::prelude::State

pub trait State {
    type Item: Debug;
    fn state(&self) -> Option<&Self::Item> { ... }
fn state_mut(&mut self) -> Option<&mut Self::Item> { ... }
fn set_state(
        &mut self,
        new_state: Self::Item
    ) -> Result<Option<Self::Item>, InvalidState<Self::Item>> { ... } }

Possible public state.

State should be implemented when it is absolutely clear what a state for your your struct means.

Associated Types

type Item: Debug

Loading content...

Provided methods

fn state(&self) -> Option<&Self::Item>

fn state_mut(&mut self) -> Option<&mut Self::Item>

fn set_state(
    &mut self,
    new_state: Self::Item
) -> Result<Option<Self::Item>, InvalidState<Self::Item>>

Remarks

You might want to use core::mem::swap.

Loading content...

Implementors

impl<N, T, F, R> State for TimedMarkovChain<N, T, F, R> where
    T: Debug + Clone
[src]

type Item = T

impl<T, D, R> State for BranchingProcess<T, D, R> where
    T: Debug + PartialEq + Clone + One + Zero + PartialOrd + Unsigned,
    D: Distribution<T>,
    R: Rng
[src]

type Item = T

impl<T, F, R> State for MarkovChain<T, F, R> where
    T: Debug + Clone
[src]

type Item = T

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

type Item = T

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

Loading content...