Resumable, caching wrapper around MboActivityAccumulationCalculator for a regular sample grid over a time-sorted, append-only event stream. More...
Public Member Functions | |
| void | Reset () |
| void | Compute (long[] eventMs, decimal[] signedVolumes, int eventCount, long lineageId, MboActivityAccumulationMode mode, int accumulationTimeSec, long firstSampleMs, long stepMs, int sampleCount, out double[] buyValues, out double[] sellValues) |
| Compute buy/sell activity for the sample grid { firstSampleMs + i * stepMs : 0 <= i < sampleCount }. Returned arrays are owned by the session, may be longer than sampleCount and are only valid until the next call. | |
Resumable, caching wrapper around MboActivityAccumulationCalculator for a regular sample grid over a time-sorted, append-only event stream.
The naive calculator is O(total events) per call because every mode carries running state from the very first event. This session removes that cost from steady-state rendering by remembering two suspension points:
Results are bit-identical to MboActivityAccumulationCalculator.Calculate because both run the exact same per-mode kernels in the exact same order.
The caller identifies the event stream by a lineage id: the id must change whenever anything other than a pure tail-append happens to the arrays (replacement, re-sort, rebuild). Within one lineage the event prefix must be immutable and sorted by timestamp. Not thread-safe; call from one thread.
| void ATAS.DataFeedsCore.MboActivityAccumulationSession.Compute | ( | long[] | eventMs, |
| decimal[] | signedVolumes, | ||
| int | eventCount, | ||
| long | lineageId, | ||
| MboActivityAccumulationMode | mode, | ||
| int | accumulationTimeSec, | ||
| long | firstSampleMs, | ||
| long | stepMs, | ||
| int | sampleCount, | ||
| out double[] | buyValues, | ||
| out double[] | sellValues | ||
| ) |
Compute buy/sell activity for the sample grid { firstSampleMs + i * stepMs : 0 <= i < sampleCount }. Returned arrays are owned by the session, may be longer than sampleCount and are only valid until the next call.
| void ATAS.DataFeedsCore.MboActivityAccumulationSession.Reset | ( | ) |