Skip to content

transition_local

transition_local(nStates, width, window?, wrap?): number[][]

Defined in: packages/pleco-xa/src/sequence/transition.js:211

Construct a localized transition matrix. State i transitions only to nearby states, weighted by window over a band of width. Off-band entries are zero (unless wrap extends locality modulo nStates), and each row is normalized to sum to 1.

number

Number of states (> 1).

number | number[] | Int32Array<ArrayBufferLike>

Local band width, scalar or per-state vector. Each value must be >= 1.

string = 'triangle'

Window shape (‘triangle’ or ‘ones’).

boolean = false

Compute locality modulo nStates when true.

number[][]

Row-stochastic transition matrix.