Grouping.Range Window Method
Definition
Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Range | Constructs a grouping that represents a moving window whose keys are within the specified distance of each other. |
Range | 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.
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
Argument | index is null. |
Argument | 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.
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
Argument | index is null. |
Argument | distance is less than or equal to zero. |