IntervalIndex<T> Class

Represents an index over contiguous intervals.

Definition

Namespace: Extreme.DataAnalysis
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public class IntervalIndex<T> : Index<Interval<T>>
where T : Object, IComparable<T>
Inheritance
Object  →  Index<Interval<T>>  →  IntervalIndex<T>

Type Parameters

T
The value of the interval bounds.

Remarks

Use the IntervalIndex<T> class to represent an index over a sequence of contiguous intervals. This type is commonly used as the index for a histogram, where the intervals represent the bins in the histogram.

Interval indexes have additional methods to look up the interval a value belongs to.

Constructors

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.

Properties

Depth Gets the number of levels in the index.
(Inherited from Index<T>)
IsSorted Gets whether the values in the index are sorted.
(Inherited from Index<T>)
IsUnique Gets whether the values in the index are unique.
(Inherited from Index<T>)
Item[IList<Int32>] Gets the specified subset of the index.
(Overrides Index<T>.Item[IList<Int32>])
Item[Int32] Gets the element at the specified position in the index.
(Inherited from Index<T>)
Item[Int32, Int32] Gets the value of the index at the specified position and level.
(Inherited from Index<T>)
KeepOrder Gets or sets whether indexes derived from this index should maintain the sort order.
(Inherited from Index<T>)
KeepUnique Gets or sets whether indexes derived from this index should maintain the uniqueness of keys.
(Inherited from Index<T>)
Length Gets the number of intervals.
(Overrides Index<T>.Length)
Name Gets or sets the name of the index.
(Inherited from Index<T>)
SortOrder Gets or sets how the values in the index are sorted.
(Inherited from Index<T>)

Methods

Append(Interval<T>) Appends the specified value to the index and returns the result.
(Overrides Index<T>.Append(T))
Append(Index<Interval<T>>, Boolean) Appends the specified index at the end of the current index and returns the result.
(Overrides Index<T>.Append(Index<T>, Boolean))
CheckOrder Verifies whether the elements appear in increasing or decreasing order.
(Inherited from Index<T>)
CheckUnique Verifies whether the elements in an index are unique.
(Inherited from Index<T>)
Contains Returns whether the specified key is present in the index.
(Inherited from Index<T>)
CopyTo Copies the elements of the index to an array beginning at the specified index.
(Inherited from Index<T>)
Equals(Index<T>) Indicates whether the current index is equal to another index.
(Inherited from Index<T>)
Equals(Object)Determines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetBounds Gets an array containing the bounds of the IntervalIndex<T>.
GetEnumerator Returns an enumerator that iterates through a collection.
(Inherited from Index<T>)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetLowerBound Gets the lower bound of the interval with the specified index.
GetObjectData Populates a SerializationInfo with the values needed to serialize the target object.
(Overrides Index<T>.GetObjectData(SerializationInfo, StreamingContext))
GetSlice(Slice) Returns a slice of the current index.
(Inherited from Index<T>)
GetSlice(T, T) Returns a slice of the current sorted index.
(Inherited from Index<T>)
GetSlice(Int32, Int32, Int32) Returns a slice of the current index.
(Inherited from Index<T>)
GetSubset Returns a subset of the current index.
(Inherited from Index<T>)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetUpperBound Gets the upper bound of the interval with the specified index.
GetValue Gets the value of the index at the specified position.
(Overrides Index<T>.GetValue(Int32))
JoinNearest Returns the index that results from joining each key in an index to the nearest key in this index.
(Inherited from Index<T>)
Lookup(IEnumerable<T>) Maps a sequence of keys to their position in the index.
(Inherited from Index<T>)
Lookup(IList<T>) Gets the indexes of the intervals containing a set of values.
Lookup(T) Maps the specified key to its position in the index.
(Inherited from Index<T>)
Lookup(T) Gets the index of the interval containing a value.
LookupNearest(IEnumerable<T>, Direction) Maps a sequence of keys to the position of the nearest key in the index.
(Inherited from Index<T>)
LookupNearest(T, Direction) Finds the key nearest to the specified value in the index.
(Inherited from Index<T>)
MakeJoinIndex Converts the index to an index that can serve as a key in a join operation.
(Inherited from Index<T>)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Nest<U> Returns a new index that adds a new level containing all the values in the specified index.
(Inherited from Index<T>)
Permute Permutes the elements of the index and returns the result.
(Inherited from Index<T>)
Remove Removes the element with the specified key in the index.
(Inherited from Index<T>)
RemoveAt Removes the element at the specified position in the index.
(Overrides Index<T>.RemoveAt(Int32))
ToArray Returns an array containing the keys in the index.
(Inherited from Index<T>)
ToStringReturns a string that represents the current object.
(Inherited from Object)
TryLookup Tries to find the specified key in the index.
(Overrides Index<T>.TryLookup(T, Int32))
TryLookupNearest Tries to find the key nearest to the specified value in the index.
(Overrides Index<T>.TryLookupNearest(T, Direction, Int32))

See Also