IntervalIndex<T> Constructor

Definition

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

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>(SerializationInfo, StreamingContext) Constructs a new index from serialization values.
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>(SerializationInfo, StreamingContext)

Constructs a new index from serialization values.
C#
protected IntervalIndex(
	SerializationInfo info,
	StreamingContext context
)

Parameters

info  SerializationInfo
The values needed to serialize or deserialize the index.
context  StreamingContext
The source and destination of a given serialized stream.

Remarks

This constructor is called internally by the .NET framework when a Vector<T> is deserialized.

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