Vector<T>.Resample(Recurrence, Direction, TypePreservingAggregatorGroup) Method

Returns a new vector that resamples the values in the vector using the specified recurrence pattern and aggregator.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public Vector<T> Resample(
	Recurrence recurrence,
	Direction direction = Direction.Backward,
	TypePreservingAggregatorGroup aggregator = null
)

Parameters

recurrence  Recurrence
The new index.
direction  Direction  (Optional)
Indicates whether the keys in the new index should be taken as the start (Forward) or end (Backward) of a sampling interval.
aggregator  TypePreservingAggregatorGroup  (Optional)
The aggregator to use on each group.

Return Value

Vector<T>
A vector that contains the resampled values.

Exceptions

ArgumentNullException

aggregator is null.

InvalidCastException

The vector's index is not of type DateTime.

InvalidOperationException

The vector's index is not sorted.

See Also