row-major-index

Returns the row-major index position of an array element.

Computes the position according to the row-major ordering of array for the element that is specified by subscripts, and returns the position of that element.

An error is signaled if the number of subscripts is not equal to the rank of the array.  An error is signaled if any of the subscripts are out of bounds for array.

The method for <array> computes the index using the subscripts and the result of calling dimensions on the array.

Exported from

Modifiers

open

Arguments

arrayAn instance of <array>.
#rest subscriptsInstances of <object>.

Values

indexAn instance of <integer>.
The class of sequences whose elements are arranged according to a Cartesian coordinate system.
Returns the dimensions of an array, as a sequence of integers.
The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of all Dylan objects.
The class of integers.