Class ScrambleDistance

    • Constructor Detail

      • ScrambleDistance

        public ScrambleDistance()
        Constructs the distance measurer as specified in the class documentation.
    • Method Detail

      • distance

        public int distance​(Permutation p1,
                            Permutation p2)
        Description copied from interface: PermutationDistanceMeasurer
        Measures the distance between two permutations.
        Parameters:
        p1 - first permutation
        p2 - second permutation
        Returns:
        distance between p1 and p2
      • max

        public int max​(int length)
        Description copied from interface: NormalizedPermutationDistanceMeasurer
        Computes the maximum possible distance between permutations of a specified length.
        Parameters:
        length - Permutation length.
        Returns:
        the maximum distance between a pair of permutations of the specified length.