Iterates over all indices with a given dimension, or with infinite dimension. All indices are returned exactly once. The exact order in which indices are provided is not specified. However, indices are returned so that for each index provided, all smaller indices (with regard to the canonical partial ordering of indices) have been returned before it. In addition, for finite dimension, it is also guaranteed that the length of the returned indices (that is, the sum of their components) increases monotonously. This is not possible for infinite dimension.
This class is not thread-safe.
@author Torsten Nahm