Index.CreateBins Method

Definition

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

Overload List

CreateBins<T>(IList<T>, SpecialBins) Creates a new IntervalIndex<T> using the specified boundaries.
CreateBins<T>(T, T, Int32, SpecialBins) Constructs a new IntervalIndex<T> with equally spaced intervals over the specified range.

CreateBins<T>(IList<T>, SpecialBins)

Creates a new IntervalIndex<T> using the specified boundaries.
C#
public static IntervalIndex<T> CreateBins<T>(
	IList<T> bounds,
	SpecialBins specialBins = SpecialBins.None
)
where T : Object, IComparable<T>

Parameters

bounds  IList<T>
An array of values of type T that specifies the boundaries of the intervals.
specialBins  SpecialBins  (Optional)
(Optional.) A SpecialBins value that specifies which special bins, if any, to include in the index.

Type Parameters

T
The type of the interval bounds.

Return Value

IntervalIndex<T>

Exceptions

ArgumentNullExceptionbounds is null.
ArgumentExceptionThe elements of bounds are not in ascending order.

CreateBins<T>(T, T, Int32, SpecialBins)

Constructs a new IntervalIndex<T> with equally spaced intervals over the specified range.
C#
public static IntervalIndex<T> CreateBins<T>(
	T lowerBound,
	T upperBound,
	int numberOfIntervals,
	SpecialBins specialBins = SpecialBins.None
)
where T : Object, IComparable<T>

Parameters

lowerBound  T
The lower bound of the range.
upperBound  T
The upper bound of the range.
numberOfIntervals  Int32
The number of intervals.
specialBins  SpecialBins  (Optional)
(Optional.) A SpecialBins value that specifies which special bins, if any, to include in the index.

Type Parameters

T

Return Value

IntervalIndex<T>

Exceptions

ArgumentOutOfRangeExceptionnumberOfIntervals is less than zero.

-or-

upperBound is less than or equal to lowerBound.

See Also