Class AbstractPermutationTransform

  • All Implemented Interfaces:
    InvertibleTransform, Transform
    Direct Known Subclasses:
    PermutationTransform, SingleDimensionPermutationTransform

    public abstract class AbstractPermutationTransform
    extends java.lang.Object
    implements InvertibleTransform
    Bijective integer transform mapping between integer coordinates in [0,n-1]. Currently, this transform handles only coordinates in the integer range because it is implemented using primitive arrays with integer indices for efficiency reasons. Expect this permutation to be transferred to long coordinates some time in more distant future.
    Author:
    Philipp Hanslovsky, Stephan Saalfeld
    • Field Detail

      • lut

        protected final int[] lut
      • inverseLut

        protected final int[] inverseLut
    • Constructor Detail

      • AbstractPermutationTransform

        public AbstractPermutationTransform​(int[] lut)
        Parameters:
        lut - must be a bijective permutation over its index set, i.e. for a lut of length n, the sorted content of the array must be [0,...,n-1] which is the index set of the lut.
    • Method Detail

      • apply

        public int apply​(int x)
      • applyChecked

        public long applyChecked​(int x)
      • applyInverse

        public int applyInverse​(int y)
      • applyInverseChecked

        public long applyInverseChecked​(int y)
      • getLutCopy

        public int[] getLutCopy()
      • getInverseLutCopy

        public int[] getInverseLutCopy()
      • checkBijectivity

        public static final boolean checkBijectivity​(int[] lut)