Table of Contents

Struct TimeWindowIndicator<TInner, TSample, TValue, TTime>

Namespace
Virtufin.Core.Behavior
Assembly
Virtufin.Core.dll

Result of TimeWindow<TSelf, TSample, TValue, TTime>(IIndicator<TSelf, TSample, TValue>, Func<TSample, TTime>, Func<TTime, TTime, bool>). Maintains a duration-bounded window of the wrapped indicator's timestamped values.

public readonly struct TimeWindowIndicator<TInner, TSample, TValue, TTime> : IIndicator<TimeWindowIndicator<TInner, TSample, TValue, TTime>, TSample, ImmutableArray<TimestampedSample<TTime, TValue>>>, ISignal<ImmutableArray<TimestampedSample<TTime, TValue>>> where TInner : IIndicator<TInner, TSample, TValue> where TTime : IComparable<TTime>

Type Parameters

TInner

The wrapped indicator's concrete type.

TSample

The sample type consumed on each observation.

TValue

The wrapped indicator's value type.

TTime

The sample time type.

Implements
IIndicator<TimeWindowIndicator<TInner, TSample, TValue, TTime>, TSample, ImmutableArray<TimestampedSample<TTime, TValue>>>
Inherited Members
Extension Methods

Properties

Value

The current signal value.

public ImmutableArray<TimestampedSample<TTime, TValue>> Value { get; }

Property Value

ImmutableArray<TimestampedSample<TTime, TValue>>

Remarks

Oldest first.

Methods

Add(TSample)

Fold one more sample in, returning the updated indicator.

public TimeWindowIndicator<TInner, TSample, TValue, TTime> Add(TSample sample)

Parameters

sample TSample

The new observation.

Returns

TimeWindowIndicator<TInner, TSample, TValue, TTime>

A new indicator instance reflecting sample.