Table of Contents

Interface IIndicator<TSelf, TSample, TValue>

Namespace
Virtufin.Core.Behaviour
Assembly
Virtufin.Core.dll

An immutable, self-folding indicator: consumes samples one at a time and exposes its current value via ISignal<T>. Composes with ISignal<T> rather than IAlgebra<TEvent, TState> or IProcess<S,E> because the indicator's own state doesn't need to be threaded as an explicit external parameter — this already is the state.

public interface IIndicator<TSelf, TSample, TValue> : ISignal<TValue> where TSelf : IIndicator<TSelf, TSample, TValue>

Type Parameters

TSelf

The concrete indicator type, so Add(TSample) returns the same concrete type rather than the interface.

TSample

The sample type consumed on each observation.

TValue

The indicator's current value type.

Inherited Members

Methods

Add(TSample)

Fold one more sample in, returning the updated indicator.

TSelf Add(TSample sample)

Parameters

sample TSample

The new observation.

Returns

TSelf

A new indicator instance reflecting sample.