Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Give the index of an ordered tuple or return the ordered tuple with that index
ResourceFunction["IndexedOrderedTuple"][choose,index] returns an ordered tuple of length choose with given index. | |
ResourceFunction["IndexedOrderedTuple"][list] gives the index of ordered tuple list. |
Generate a list of the first ten 3-tuples:
In[1]:= |
Out[1]= |
The function can return ordered tuples of a large index:
In[2]:= |
Out[2]= |
Applying the function to an ordered tuple returns the index:
In[3]:= |
Out[3]= |
Any increasing list of integers can be considered as a ordered tuple with a unique index:
In[4]:= |
Out[4]= |
The index above generates a unique ordered 10-tuple:
In[5]:= |
Out[5]= |
Here are some ordered 2-tuples with their indices to show their structure:
In[6]:= |
Out[6]= |
The ordered 2-tuple {4,4} has an index of :
In[7]:= |
Out[7]= |
Recover the same information with IndexedOrderedTuple:
In[8]:= |
Out[8]= |
The structure of ordered 3-tuples in 3D:
In[9]:= |
Out[9]= |
This work is licensed under a Creative Commons Attribution 4.0 International License