Table of Contents

Struct MappedIndicator<TInner, TSample, TValue, TResult>

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

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

TInner

The wrapped indicator's concrete type.

TSample

The sample type consumed on each observation.

TValue

The wrapped indicator's value type.

TResult

This 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

sample TSample

The new observation.

Returns

MappedIndicator<TInner, TSample, TValue, TResult>

A new indicator instance reflecting sample.