Grouping.Resample Method

Definition

Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Resample(Index<DateTime>, Recurrence, Direction) Creates a grouping that resamples the observations according to the specified recurrence.
Resample<R>(Index<R>, Index<R>, Direction) Creates a grouping that resamples the observations from one index to another.

Grouping.Resample(Index<DateTime>, Recurrence, Direction)

Creates a grouping that resamples the observations according to the specified recurrence.
C#
public static Grouping<DateTime> Resample(
	Index<DateTime> index,
	Recurrence recurrence,
	Direction direction = Direction.Backward
)

Parameters

index  Index<DateTime>
The original index.
recurrence  Recurrence
The recurrence pattern to resample to.
direction  Direction  (Optional)
Indicates whether the entries in index should be taken as the start (Forward) or end (Backward) of a sampling interval.

Return Value

Grouping<DateTime>
A grouping object that represents the resampling.

Exceptions

ArgumentNullException

index is null.

-or-

recurrence is null.

Grouping.Resample<R>(Index<R>, Index<R>, Direction)

Creates a grouping that resamples the observations from one index to another.
C#
public static Grouping<R> Resample<R>(
	Index<R> oldIndex,
	Index<R> newIndex,
	Direction direction
)

Parameters

oldIndex  Index<R>
The original index.
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.

Type Parameters

R
The element type of the indexes.

Return Value

Grouping<R>
A grouping object that represents the resampling.

Exceptions

ArgumentNullException

oldIndex is null.

-or-

newIndex is null.

InvalidOperationException

oldIndex or newIndex is not sorted.

-or-

oldIndex and newIndex do not have the same sort order.

See Also