This gives all combinations of indices of a tensor with dimension d in
the order of the numbers in the memory.
Usage
pos.tensor(d)
Arguments
d
a dim attribute of a tensor
Value
a matrix with the same number of rows as the tensor has entries an the
same number of columns as the tensor has dimensions. Each row
represents the index combination of a the corresponding element.
Details
tensors are stored according to the R-convention that the leftmost
index varies fastest.