IndexCollection Class |
Namespace: Novacta.Analytics
The IndexCollection type exposes the following members.
Name | Description | |
---|---|---|
Count |
Gets the number of elements in this instance.
| |
IsReadOnly |
Gets a value indicating whether this instance is read-only.
| |
ItemIndexCollection |
Gets the indexes in the IndexCollection corresponding to
the specified positions.
| |
ItemInt32 |
Gets or sets the index in the IndexCollection corresponding
the specified position.
| |
Max |
Gets the maximum index in the IndexCollection.
|
Name | Description | |
---|---|---|
CompareTo(IndexCollection) |
Compares the current object with another object of the same type.
| |
CompareTo(Object) |
Compares the current instance with another object of the same type and
returns an integer that indicates whether the current instance precedes, follows,
or occurs in the same position in the sort order as the other object.
| |
Contains | Determines whether the ICollectionT contains a specific value. | |
CopyTo | ||
Default |
Creates an IndexCollection which ranges from zero to
the specified last index.
| |
Equals(IndexCollection) |
Indicates whether the current object is equal to another object of the same type.
| |
Equals(Object) | (Overrides ObjectEquals(Object).) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
FromArray(Int32) |
Initializes a new instance of the IndexCollection class
that contains elements copied from the specified array.
| |
FromArray(Int32, Boolean) |
Initializes a new instance of the IndexCollection class
whose elements are stored in the specified array.
| |
GetEnumerator | Returns an enumerator that iterates through the collection. | |
GetHashCode |
Returns a hash code for this instance.
(Overrides ObjectGetHashCode.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IndexOf | Determines the index of a specific item in the IListT. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Range |
Creates an IndexCollection which ranges from the specified
first index to the specified last index.
| |
Sequence |
Initializes a new instance of the IndexCollection class
that contains a sequence of evenly spaced elements.
| |
Sort |
Sorts the IndexCollection in ascending order.
| |
ToString |
Returns a String that represents this instance.
(Overrides ObjectToString.) |
Name | Description | |
---|---|---|
Equality |
Returns a value that indicates whether
an IndexCollection instance is
equal to another IndexCollection instance.
| |
GreaterThan |
Returns a value that indicates whether
an IndexCollection instance is
greater than another IndexCollection instance.
| |
GreaterThanOrEqual |
Returns a value that indicates whether
an IndexCollection instance is
greater than or equal to another IndexCollection instance.
| |
Inequality |
Returns a value that indicates whether
an IndexCollection instance is not
equal to another IndexCollection instance.
| |
LessThan |
Returns a value that indicates whether
an IndexCollection instance is
less than another IndexCollection instance.
| |
LessThanOrEqual |
Returns a value that indicates whether
an IndexCollection instance is
less than or equal to another IndexCollection instance.
|
Name | Description | |
---|---|---|
ICollectionInt32Add |
Adds an item to the ICollectionT.
This implementation always throws a NotSupportedException.
| |
ICollectionInt32Clear |
Removes all items from the ICollectionT.
This implementation always throws a NotSupportedException.
| |
ICollectionInt32Remove |
Removes the first occurrence of a specific object from the ICollectionT.
This implementation always throws a NotSupportedException.
| |
IEnumerableGetEnumerator | Returns an enumerator that iterates through a collection. | |
IListInt32Insert |
Inserts an item to the IListT at the specified index.
This implementation always throws a NotSupportedException.
| |
IListInt32RemoveAt |
Removes the IListT item at the specified index.
This implementation always throws a NotSupportedException.
|
Instantiation
IndexCollection instances can be created using several methods. Indexes ranging in a given interval are returned by Range(Int32, Int32). A collection of evenly spaced indexes can be initialized by Sequence(Int32, Int32, Int32). A collection ranging from zero to a specified last index is instead returned by Default(Int32). A collection can also be defined to contain elements copied from a specified array by calling FromArray(Int32), or, eventually to prevent copying operations, by calling FromArray(Int32, Boolean).
Matrix Indexing
The DoubleMatrix class defines zero-based indexers to get or set individual matrix entries, or entire sub matrices. Usually, a given datum is accessed by specifying a pair of row and column indexes, but indexers are overloaded to accept also a linear index, i.e. an index to which an matrix element corresponds provided that matrix entries have been interpreted as well ordered following a column major ordering. All such indexers accept IndexCollection instances as arguments, enabling the simultaneous specification of multiple linear, row, or column indexes.
Comparison
IndexCollection instances are quasi-lexicographically ordered. This means that instances are firstly ordered by their Count, and then, within collections having the same length, by lexicographic order.
This also means that when tested for equality, IndexCollection instances are considered equal if and only if they have the same Count and, for each index position, indexes corresponding to such position are equal, too.