Skip to content

Documentation / @finchart/indicators / ExtremumFold

Interface: ExtremumFold ​

Defined in: indicators/src/kernels.ts:361

The windowed extremum as a fold — highest/lowest's monotonic deque, with the array's absolute index replaced by a step counter so the state can be snapshotted and resumed. Amortized O(1) per step; a snapshot copies the ring and the deque (O(period)).

Methods ​

restore() ​

restore(state): void

Defined in: indicators/src/kernels.ts:364

Parameters ​

state ​

ExtremumState

Returns ​

void


snapshot() ​

snapshot(): ExtremumState

Defined in: indicators/src/kernels.ts:363

Returns ​

ExtremumState


step() ​

step(value): number | null

Defined in: indicators/src/kernels.ts:362

Parameters ​

value ​

number | null

Returns ​

number | null