NDIM_INDICES Name
NDIM_INDICES Purpose
Indexing info for an n-dimensional table.
Category
Calling Sequence
ndim_indices, dims, inds, s Inputs
dims = array of dimension sizes for table. in
inds = array of indices into each dimension. in
The number of elements in dims and inds must be the
same. The first index is 0 for each dimension.
Keyword Parameters
Keywords
ERROR=err Error flag: 0=ok. Outputs
s = returned information structure: out
{nd:nd, ; number of dimensions in table.
tot:tot, ; total cells in table.
nc:nc, ; number of table cells completed.
nl:nl} ; number of table cells left.
Common Blocks
Notes
Note: For a set of indices (i1,i2,...,in) pointing to
a cell in the n-dimensional table, the returned
structure will indicate how many table cells there are
before that cell in the table (nc), and how many cells
are left including the indicated cell (nl).
The following chart shows how the values are computed:
Dimension Size Index #_completed
1 n1 i1 i1 +
2 n2 i2 i2*n1 +
3 n3 i3 i3*n1*n2 +
4 n4 i4 i4*n1*n2*n3 +
... ... ... ...
Sum the last column over all the dimensions in the table
to get the number of cells completed.
Modification History
R. Sterner, 2003 Jun 18
R. Sterner, 2010 Jun 07 --- Converted arrays from () to [].
Copyright (C) 2003, Johns Hopkins University/Applied Physics Laboratory
This software may be used, copied, or redistributed as long as it is not
sold and this copyright notice is reproduced on each copy made. This
routine is provided as is without any express or implied warranties
whatsoever. Other limitations apply as described in the file disclaimer.txt.