Node
Let be a -node or simply a node or vertex of a -grid. It can be described as a tuple where :
Here we use the notation instead of because it is more convenient. The total number of nodes in the grid, which is also the cardinality of , is given by :
Labeling
As suggested by the employed notation, nodes can simply be identified by stacking together the indexes of the values taken by each parameter. Thus, a node has a unique tuple "address" in the grid :
Numbering
However, there is exactly different ways to order a finite set of nodes :
Where is the permutation function (in a total of ) over the set .
Fore sure, not all ways of numbering this nodes are made equals in terms of convenience, especially when it comes to construct grid's cells from their corner nodes. The proposed numbering is the following :
Indexing
Nodes can be indexed :
From Address to Index
Nodes can be indexed from their tuple address :
From Index to Address
Recursive euclidean division leads back to the address :
The recursive factors should be precomputed for a given grid to achieve fast index to tuple conversion.