Markov::TransitionMatrix(LinkType)
Inherits Hash / Iterable / Enumerable / Reference / Object
A TransitionMatrix is an object for storing and selecting transitions in a Markov::Chain.
Constructors
new(pull : JSON::PullParser)
Makes it possible to use #to_json and #from_json (see Crystal docs)
Instance methods
probable_transition
Chooses a random, probable transition from the transitions in the matrix.
If matrix is empty, will throw Markov::Exceptions::EmptyTransitionMatrixException