Class CycleDistance

java.lang.Object
org.cicirello.permutations.distance.CycleDistance
All Implemented Interfaces:
NormalizedPermutationDistanceMeasurer, NormalizedPermutationDistanceMeasurerDouble, PermutationDistanceMeasurer, PermutationDistanceMeasurerDouble

public final class CycleDistance extends Object implements NormalizedPermutationDistanceMeasurer
Cycle distance is the count of the number of non-singleton permutation cycles between a pair of permutations. Cycle distance is a semi-metric, satisfying all of the metric properties except for the triangle inequality.

It was introduced in the following article:

Vincent A. Cicirello. 2022. Cycle Mutation: Evolving Permutations via Cycle Induction, Applied Sciences, 12(11), Article 5506 (June 2022). doi:10.3390/app12115506

Runtime: O(n), where n is the permutation length.

  • Constructor Details

    • CycleDistance

      public CycleDistance()
      Constructs the distance measurer as specified in the class documentation.
  • Method Details