ReadonlyfamilyReadonlyinputsOptional ReadonlykindOptional ReadonlylabelHuman lineage fragment, e.g. SMA(20) of iv21. Optional — a generic
op(params) of inputs is derived when absent, but a label reads far
better in a legend chip or a graph node.
Optional ReadonlylookbackRows of history this op needs before a requested range for its output over that range to be fully defined — [PND-PROCHIST].
A count-window study of period bars needs period - 1. Declaring
it lets requiredHistory derive the minimum safe tail for a
whole plan, so a consumer slicing a hot leading edge stops guessing:
an 8-study stack over 500k rows costs 765 ms/tick, and the same stack
over a 5,000-row tail 5.4 ms/tick. The window is the difference
between 1.3 ticks/sec and interactive.
An IIR op has no exact finite warm-up — an EMA depends on every
row before it, decaying but never reaching zero. 4 * period is the
usual engineering answer and each such op should declare it rather
than have the folder assume one, because the multiplier is a claim
about acceptable error and only the op knows what it is.
Omitted means unknown, not zero, and requiredHistory
reports that rather than returning a number a caller would slice
against. An op that genuinely needs no history — anything
element-wise — should say () => 0.
ReadonlynameReadonlyoutputsReadonlyparamsReadonlyrunOptional ReadonlyrunRecompute only [from, to), given the previous output —
[PND-PROCRANGE]. Optional, and opt-in for a reason.
The graph calls this instead of run when it knows which rows changed and this node has a previous output to patch; otherwise it falls back to a full run, so declaring nothing is always correct and merely slower.
Only declare it if a patched result is bit-identical to a
from-scratch one. That holds for the range-exact rolling kernel
([PND-PROCKERN]) and does not hold for median, percentiles, min
or max, which still sweep whole-series. An op that declares this
without that property makes its answers depend on the sequence of
edits that produced them — which is invisible in a test that only
ever computes from scratch.
Requires lookback, since that is what widens an upstream dirty range into this node's. Without it the graph cannot know how far back a change reaches and will not range.
Readonlysummary
Discriminates against FoldDef. Optional, because an op is the default.