Module org.cicirello.jpt
Interface NormalizedPermutationDistanceMeasurerDouble
- All Superinterfaces:
PermutationDistanceMeasurerDouble
- All Known Subinterfaces:
NormalizedPermutationDistanceMeasurer
- All Known Implementing Classes:
AcyclicEdgeDistance,BlockInterchangeDistance,CycleDistance,CycleEditDistance,CyclicEdgeDistance,CyclicRTypeDistance,DeviationDistance,DeviationDistanceNormalized,DeviationDistanceNormalized2005,ExactMatchDistance,InterchangeDistance,KCycleDistance,KendallTauDistance,LeeDistance,ReinsertionDistance,ReversalDistance,RTypeDistance,ScrambleDistance,SquaredDeviationDistance,WeightedKendallTauDistance
public interface NormalizedPermutationDistanceMeasurerDouble
extends PermutationDistanceMeasurerDouble
Implement this interface to define a distance metric for permutations that supports normalizing
the distance to the interval [0,1].
-
Method Summary
Modifier and TypeMethodDescriptiondoublemaxf(int length) Computes the maximum possible distance between permutations of a specified length.default doublenormalizedDistance(Permutation p1, Permutation p2) Measures the distance between two permutations, normalized to the interval [0.0, 1.0].Methods inherited from interface org.cicirello.permutations.distance.PermutationDistanceMeasurerDouble
distancef
-
Method Details
-
maxf
double maxf(int length) 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.
-
normalizedDistance
Measures the distance between two permutations, normalized to the interval [0.0, 1.0].- Parameters:
p1- first permutationp2- second permutation- Returns:
- distance between p1 and p2 normalized to the interval [0.0, 1.0]
- Throws:
IllegalArgumentException- if p1.length() is not equal to p2.length().
-