Industrial Data Science
in C# and .NET:
Simple. Fast. Reliable.
 
 

ILNumerics - Technical Computing

Modern High Performance Tools for Technical

Computing and Visualization in Industry and Science

tgt

Sequential Indices

If the parameterlist for a subarray range definition contains only one parameter, its values are interpreted as 'sequential indices'. Sequential indices reflect the position of array elements in the underlying storage format.

Internally ILNumerics stores array elements as one dimensional system array, in column major order:

ILNumerics Array:

Internal storage scheme:

Sequential indexing offers a way to address elements within the whole array - by using only one parameter:

Numeric arrays of any shape and dimensionality are allowed as index specification. Its elements are used as sequential indices into the matrix A. The subarray A[I] will have the shape of I and the elements of A, according to the sequential indices found in I. The next example uses the indices from an index array I of size [5,3] to extract elements from A: