Shapes and positions are both represented by class IPosition. However, they have to be treated differently in this class, because removed axes for a position have value 0, while for a shape they have value 1. Hence there are different functions for them and the user has to take care that the correct function is called.
Construct it with the mapping from old to new axes order.
A value of -1 means that the old axes is ignored in the new one.
Another value gives the new axis number.
It determines if axes are removed and/or reordered.
Copy constructor (copy semantics).
Assignment (copy semantics). This and that do not have to have the same length.
Are axes removed?
Is the axes order reordered?
Get the mapping of old->new. The length of the resulting IPosition is the dimensionality of the original lattice. A value of -1 indicates that the corresponding axis in the original lattice is removed. Another value is the axis number in the new lattice,
Get the mapping of new->old. The length of the resulting IPosition is the dimensionality of the new lattice. Its values give the axes in the original lattice.
Map an old position to the new one. In debug-mode it checks if the removed axes have position 0 in the input position.
Map a new position or shape to the old one.
Map an old shape to the new one. In debug-mode it checks if the removed axes have length 1 in the input shape.
Map a new position or shape to the old one.
Map an old shape to the new one. In debug-mode it checks if the removed axes have length 1 in the input slicer.
Map a new position or shape to the old one.