Module org.cicirello.jpt
Interface PermutationDistanceMeasurer
- All Superinterfaces:
PermutationDistanceMeasurerDouble
- All Known Subinterfaces:
NormalizedPermutationDistanceMeasurer
- All Known Implementing Classes:
AcyclicEdgeDistance
,BlockInterchangeDistance
,CycleDistance
,CycleEditDistance
,CyclicEdgeDistance
,CyclicIndependentDistance
,CyclicReversalIndependentDistance
,CyclicRTypeDistance
,DeviationDistance
,ExactMatchDistance
,InterchangeDistance
,KCycleDistance
,KendallTauDistance
,LeeDistance
,ReinsertionDistance
,ReversalDistance
,ReversalIndependentDistance
,RTypeDistance
,ScrambleDistance
,SquaredDeviationDistance
Implement this interface, PermutationDistanceMeasurer, to define a distance metric for
permutations.
-
Method Summary
Modifier and TypeMethodDescriptionint
distance
(Permutation p1, Permutation p2) Measures the distance between two permutations.default double
distancef
(Permutation p1, Permutation p2) Measures the distance between two permutations
-
Method Details
-
distance
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().
-
distancef
Measures the distance between two permutations- Specified by:
distancef
in interfacePermutationDistanceMeasurerDouble
- Parameters:
p1
- first permutationp2
- second permutation- Returns:
- distance between p1 and p2
- Throws:
IllegalArgumentException
- if p1.length() is not equal to p2.length().
-