Struct MappedIndicator<TInner, TSample, TValue, TResult>
Result of Map<TSelf, TSample, TValue, TResult>(IIndicator<TSelf, TSample, TValue>, Func<TValue, TResult>). Wraps a source indicator with a pure value transform, threading Add(TSample) into the source on every sample.
public readonly struct MappedIndicator<TInner, TSample, TValue, TResult> : IIndicator<MappedIndicator<TInner, TSample, TValue, TResult>, TSample, TResult>, ISignal<TResult> where TInner : IIndicator<TInner, TSample, TValue>
Type Parameters
TInnerThe wrapped indicator's concrete type.
TSampleThe sample type consumed on each observation.
TValueThe wrapped indicator's value type.
TResultThis indicator's value type.
- Implements
-
IIndicator<MappedIndicator<TInner, TSample, TValue, TResult>, TSample, TResult>ISignal<TResult>
- Inherited Members
- Extension Methods
Properties
Value
The current signal value.
public TResult Value { get; }
Property Value
- TResult
Methods
Add(TSample)
Fold one more sample in, returning the updated indicator.
public MappedIndicator<TInner, TSample, TValue, TResult> Add(TSample sample)
Parameters
sampleTSampleThe new observation.
Returns
- MappedIndicator<TInner, TSample, TValue, TResult>
A new indicator instance reflecting
sample.