Constructs a markov chain with empty states of the given sizes.
Constructs a markov chain using a list of existing states.
Trains the markov chain with a specific token sequence.
Returns a token generated from the internal set of states, based on the tokens previously generated. If no token can be produced, a random one is returned.
Ditto, but produces an array of token with the given length.
Ditto, but the array is given as an out-parameter.
Pushes a token to the markov chain's history buffer.
Pushes tokens to the markov chain's history buffer, seeding it for subsequent calls to select() or generate().
Returns a token generated from the internal set of states, based on the tokens previously generated. If no token can be produced, null is returned.
Trains the markov chain from a sequence of input tokens.
Checks if all of the markov chain's states are empty.
Returns the number of states used by the markov chain.
Returns the lengths of the markov chain's states in an unknown order.
Returns a randomly selected token from a randomly selected state.
Rehashes the associative arrays used in the markov chain's states.
Resets the markov chain's history buffer to an empty state.
Returns the sizes of the markov chain's states in an unknown order.
Returns an array representing the markov chain's internal set of states.