Vector<T>.Resample Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Resample( | Returns a new vector that resamples the values in the vector using the specified recurrence pattern and aggregator. |
Resample<R>(Index<R>, Direction, TypePreservingAggregatorGroup) | Returns a new vector that resamples the values in the vector using the specified index and aggregator. |
Resample<U>(Recurrence, Direction, AggregatorGroup<U>) | Returns a new vector that resamples the values in the vector using the specified recurrence pattern and aggregator. |
Resample<R, U>(Index<R>, Direction, AggregatorGroup<U>) | Returns a new vector that resamples the values in the vector using the specified index and aggregator. |
Resample<R>(Index<R>, Direction, TypePreservingAggregatorGroup)
Returns a new vector that resamples the values in the vector using the specified
index and aggregator.
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. |
Resample<R, U>(Index<R>, Direction, AggregatorGroup<U>)
Returns a new vector that resamples the values in the vector using the specified
index and aggregator.
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
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. |
Resample(Recurrence, Direction, TypePreservingAggregatorGroup)
Returns a new vector that resamples the values in the vector using the specified
recurrence pattern and aggregator.
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
Argument | aggregator is null. |
Invalid | The vector's index is not of type DateTime. |
Invalid | The vector's index is not sorted. |
Resample<U>(Recurrence, Direction, AggregatorGroup<U>)
Returns a new vector that resamples the values in the vector using the specified
recurrence pattern and aggregator.
public Vector<U> Resample<U>(
Recurrence recurrence,
Direction direction,
AggregatorGroup<U> aggregator
)
Parameters
- recurrence Recurrence
- The new index.
- direction Direction
- Indicates whether the keys in the new index should be taken from the start (Forward) or end (Backward) of a sampling interval.
- aggregator AggregatorGroup<U>
- The aggregator to use on each group.
Type Parameters
- U
- The element type of the result.
Return Value
Vector<U>A vector that contains the resampled values.
Exceptions
Argument | aggregator is null. |
Invalid | The vector's index is not of type DateTime. |
Invalid | The vector's index is not sorted. |