MarkovSetN:
Filter:
Classes (extension) | Collections > Unordered | Libraries > MathLib > Markov & Fuzzy

MarkovSetN : LookupMarkovSet : IdentityMarkovSet : MarkovSet : Object
ExtensionExtension

nth order markov set
Source: MarkovSet.sc

Description

Constant order set. For variable order see ShannonFinger. Uses an optimized identity lookup in which arrays of elements are stored internally as symbols.

Part of MathLib, a diverse library of mathematical functions.

Class Methods

MarkovSetN.new(args, order: 1, updateSeeds: false)

Arguments:

args

A list of arrays that each represent one node in the set:

[[array_of_elements], [next_elements], [weigths]]

array_of_elementsShould be of size order
next_elementsThe next node is searched by simple equality. If nil, this is a terminator node
weightsThe array is normalized. If weigths is nil, equal weight is used.

If args is nil, the set is created and may be trained by the other methods.

order

The order of the set.

updateSeeds

If set to true, each element is always added to the seeds

MarkovSetN.fill(n, stream, order: 1)

Arguments:

n

Number of items to read.

stream

A function or stream that returns items to read.

order

Order of the new set.

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

.embedInStream(inval, repeats: inf)

.embedSpyInStream(pattern, repeats: inf, inval)

.order

.registerAsNext(obj)

Examples

direct node definition

training by a stream

Authors

Julian Rohrhuber, 2004, 2007.