Vector<T>.Resample<R, U>(Index<R>, Direction, AggregatorGroup<U>) Method

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

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public Vector<U> Resample<R, U>(
	Index<R> newIndex,
	Direction direction,
	AggregatorGroup<U> aggregator
)

Parameters

newIndex  Index<R>
The new index.
direction  Direction
Indicates whether the entries in newIndex should be taken as the start (Forward) or end (Backward) of a sampling interval.
aggregator  AggregatorGroup<U>
The aggregator to use on each group.

Type Parameters

R
The element type of the indexes.
U
The element type of the result.

Return Value

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

Exceptions

ArgumentNullException

newIndex is null.

-or-

aggregator is null.

InvalidCastException

The vector's index is not of the same type as newIndex.

InvalidOperationException

The vector's index or newIndex is not sorted.

-or-

The vector's index and newIndex do not have the same sort order.

See Also