[−][src]Trait markovian::prelude::StateIterator
Iterator with an internal state that is thought as the "zero" element.
Required methods
fn state_as_item(&self) -> Option<Self::Item>
If Iterator and State uses the same type, then a direct implementation is the following.
self.state().cloned()
Remarks
- Cloned is needed if the underlying iterator depends on its internal state.
- You should use #[inline] when implementing this method.
Provided methods
fn trajectory(self) -> Chain<IntoIter<Self::Item>, Self>
Returns a new iterator whose first element is the state (seen as an item of the Iteratior) and then follows with the iterator.
Implementors
impl<N, T, F, R> StateIterator for TimedMarkovChain<N, T, F, R> where
T: Debug + Clone,
F: Transition<T, (N, T)>,
R: Rng,
N: From<f64>,
[src]
T: Debug + Clone,
F: Transition<T, (N, T)>,
R: Rng,
N: From<f64>,
fn state_as_item(&self) -> Option<Self::Item>
[src]
impl<T, D, R> StateIterator for BranchingProcess<T, D, R> where
T: Debug + PartialEq + Clone + One + Zero + PartialOrd + Unsigned,
D: Distribution<T>,
R: Rng,
[src]
T: Debug + PartialEq + Clone + One + Zero + PartialOrd + Unsigned,
D: Distribution<T>,
R: Rng,
fn state_as_item(&self) -> Option<Self::Item>
[src]
impl<T, F, R> StateIterator for MarkovChain<T, F, R> where
T: Debug + Clone,
F: Transition<T, T>,
R: Rng,
[src]
T: Debug + Clone,
F: Transition<T, T>,
R: Rng,
fn state_as_item(&self) -> Option<Self::Item>
[src]
impl<T, W, R> StateIterator for ContFiniteMarkovChain<T, W, R> where
W: Float + Weight,
Exp1: Distribution<W>,
Uniform<W>: Debug + Clone,
T: Debug + PartialEq + Clone,
R: Rng,
[src]
W: Float + Weight,
Exp1: Distribution<W>,
Uniform<W>: Debug + Clone,
T: Debug + PartialEq + Clone,
R: Rng,
fn state_as_item(&self) -> Option<Self::Item>
[src]
impl<T, W, R> StateIterator for FiniteMarkovChain<T, W, R> where
W: Weight,
Uniform<W>: Debug + Clone,
T: Debug + PartialEq + Clone,
R: Rng,
[src]
W: Weight,
Uniform<W>: Debug + Clone,
T: Debug + PartialEq + Clone,
R: Rng,