Expand description
A generic Markov chain for almost any type.
In particular, elements of the chain must be Eq, Hash, and Clone.
§Examples
use markov::Chain;
let mut chain = Chain::new();
chain.feed_str("I like cats and I like dogs.");
println!("{}", chain.generate_str());use markov::Chain;
let mut chain = Chain::new();
chain.feed(vec![1u8, 2, 3, 5]).feed([3u8, 9, 2]);
println!("{:?}", chain.generate());Structs§
- Chain
- A generic Markov chain for almost any type.
In particular, elements of the chain must be
Eq,Hash, andClone. - Infinite
Chain Iterator - An infinite iterator over a Markov chain.
- Sized
Chain Iterator - A sized iterator over a Markov chain.
Traits§
- Chainable
- The definition of all types that can be used in a
Chain.
Type Aliases§
- Infinite
Chain String Iterator - An infinite iterator over a Markov chain of strings.
- Sized
Chain String Iterator - A sized iterator over a Markov chain of strings.