IntervalIndex<T> Constructor

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0

Overload List

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

IntervalIndex<T>(T[])

Constructs a new IntervalIndex<T> using the specified boundaries.
C#
public IntervalIndex(
	T[] bounds
)

Parameters

bounds  T[]
An array that specifies the boundaries of the intervals.

Exceptions

ArgumentNullException

bounds is null.

ArgumentException

The elements of bounds are not in ascending order.

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

Constructs a new IntervalIndex<T> using the specified boundaries.
C#
public IntervalIndex(
	IList<T> bounds,
	SpecialBins specialBins
)

Parameters

bounds  IList<T>
A list that specifies the boundaries of the intervals. The values in this list must be in increasing order.
specialBins  SpecialBins
A SpecialBins value that specifies which special bins, if any, to include in the index.

Exceptions

ArgumentNullException

bounds is null.

ArgumentException

The elements of bounds are not in ascending order.

IntervalIndex<T>(T, T, Int32)

Constructs a new IntervalIndex<T> with equally spaced intervals over the specified range.
C#
public IntervalIndex(
	T lowerBound,
	T upperBound,
	int numberOfIntervals
)

Parameters

lowerBound  T
The lower bound of the range.
upperBound  T
The upper bound of the range.
numberOfIntervals  Int32
The number of intervals.

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

Constructs a new IntervalIndex<T> with equally spaced intervals over the specified range.
C#
public IntervalIndex(
	T lowerBound,
	T upperBound,
	int numberOfIntervals,
	SpecialBins specialBins
)

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
A SpecialBins value that specifies which special bins, if any, to include in the index.

Exceptions

ArgumentOutOfRangeException

numberOfIntervals is less than zero.

-or-

upperBound is less than or equal to lowerBound.

See Also