Iterator[MixedRadix]
Rank
compute the rank of an ordinary mixed radix tuple
Calling Sequence
Parameters
Description
Examples
Compatibility
Rank(a,m)
a
-
{list,rtable}; tuple
m
{list,rtable}; radices
Rank computes the rank of an ordinary mixed radix tuple.
The a parameter is the tuple. It is a list or one-dimensional rtable of nonnegative integers. The first element is the low-order element.
The m parameter is the radices. It is a list or one-dimensional rtable of nonnegative integers.
with⁡Iterator:-MixedRadix:
Print the ranks of mixed radix tuples.
radices≔3,1,4,1:
M≔Iterator:-MixedRadixTuples⁡radices
M≔MixedRadixTuples⁡3,1,4,1
forainMdoprintf⁡%2d : %d\n,Rank⁡a,radices,aenddo:
1 : 0 0 0 0 2 : 1 0 0 0 3 : 2 0 0 0 4 : 0 0 1 0 5 : 1 0 1 0 6 : 2 0 1 0 7 : 0 0 2 0 8 : 1 0 2 0 9 : 2 0 2 0 10 : 0 0 3 0 11 : 1 0 3 0 12 : 2 0 3 0
The Iterator[MixedRadix][Rank] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
Iterator[MixedRadixTuples]
Download Help Document