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.
Parameters
Section titled “Parameters”nStates
Section titled “nStates”number
Number of states (> 1).
number | number[] | Int32Array<ArrayBufferLike>
Local band width, scalar or per-state vector. Each value must be >= 1.
window?
Section titled “window?”string = 'triangle'
Window shape (‘triangle’ or ‘ones’).
boolean = false
Compute locality modulo nStates when true.
Returns
Section titled “Returns”number[][]
Row-stochastic transition matrix.