Interface PermutationDistanceMeasurer
-
- All Superinterfaces:
PermutationDistanceMeasurerDouble
- All Known Implementing Classes:
AcyclicEdgeDistance
,BlockInterchangeDistance
,CyclicEdgeDistance
,CyclicIndependentDistance
,CyclicReversalIndependentDistance
,CyclicRTypeDistance
,DeviationDistance
,ExactMatchDistance
,InterchangeDistance
,KendallTauDistance
,LeeDistance
,ReinsertionDistance
,ReversalDistance
,ReversalIndependentDistance
,RTypeDistance
,ScrambleDistance
,SquaredDeviationDistance
public interface PermutationDistanceMeasurer extends PermutationDistanceMeasurerDouble
Implement this interface, PermutationDistanceMeasurer, to define a distance metric for permutations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
distance(Permutation p1, Permutation p2)
Measures the distance between two permutations.-
Methods inherited from interface org.cicirello.permutations.distance.PermutationDistanceMeasurerDouble
distancef
-
-
-
-
Method Detail
-
distance
int distance(Permutation p1, Permutation p2)
Measures the distance between two permutations.- Parameters:
p1
- first permutationp2
- second permutation- Returns:
- distance between p1 and p2
- Throws:
IllegalArgumentException
- if p1.length() is not equal to p2.length().
-
-