Grouping.RangeWindow Method

Definition

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

Overload List

RangeWindow(Index<DateTime>, TimeSpan, Direction) Constructs a grouping that represents a moving window whose keys are within the specified distance of each other.
RangeWindow(Index<Double>, Double, Direction) Constructs a grouping that represents a moving window whose keys are within the specified distance of each other.

RangeWindow(Index<DateTime>, TimeSpan, Direction)

Constructs a grouping that represents a moving window whose keys are within the specified distance of each other.
C#
public static Grouping<DateTime> RangeWindow(
	Index<DateTime> index,
	TimeSpan distance,
	Direction direction = Direction.Forward
)

Parameters

index  Index<DateTime>
The index the grouping is over.
distance  TimeSpan
The maximum distance between keys within a window. Must be greater than zero.
direction  Direction  (Optional)
Indicates whether the keys representing each group should be the first (forward) or the last (backward) in each group.

Return Value

Grouping<DateTime>
A grouping object that represents the moving window.

Exceptions

ArgumentNullException

index is null

ArgumentOutOfRangeException

distance is less than or equal to zero.

RangeWindow(Index<Double>, Double, Direction)

Constructs a grouping that represents a moving window whose keys are within the specified distance of each other.
C#
public static Grouping<double> RangeWindow(
	Index<double> index,
	double distance,
	Direction direction = Direction.Forward
)

Parameters

index  Index<Double>
The index the grouping is over.
distance  Double
The maximum distance between keys within a window. Must be greater than zero.
direction  Direction  (Optional)
Specifies whether the group keys should be the first (forward) or last (backward) key in each group.

Return Value

Grouping<Double>
A grouping object that represents the moving window.

Exceptions

ArgumentNullException

index is null

ArgumentOutOfRangeException

distance is less than or equal to zero.

See Also