Vector<T>.Resample<R>(Index<R>, Direction, Type Preserving Aggregator Group) 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#
A vector that contains the resampled values.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public Vector<T> Resample<R>(
Index<R> newIndex,
Direction direction = Direction.Backward,
TypePreservingAggregatorGroup aggregator = null
)
Parameters
- newIndex Index<R>
- The new index.
- direction Direction (Optional)
- Indicates whether the entries in newIndex should be taken as the start (Forward) or end (Backward) of a sampling interval.
- aggregator TypePreservingAggregatorGroup (Optional)
- The aggregator to use on each group.
Type Parameters
- R
- The element type of the indexes.
Return Value
Vector<T>A vector that contains the resampled values.
Exceptions
Argument | newIndex is null. -or- aggregator is null. |
Invalid | The vector's index is not of the same type as newIndex. |
Invalid | The vector's index or newIndex is not sorted. -or- The vector's index and newIndex do not have the same sort order. |