Index.Create Bins 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
Create | Creates a new IntervalIndex<T> using the specified boundaries. |
Create | 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.
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
Argument | bounds is null. |
Argument | The 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.
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
Argument | numberOfIntervals is less than zero. -or- upperBound is less than or equal to lowerBound. |