Computes the maximum possible distance between permutations
diff --git a/docs/api/org/cicirello/permutations/class-use/Permutation.html b/docs/api/org/cicirello/permutations/class-use/Permutation.html
index cba30c29..d5a47c00 100644
--- a/docs/api/org/cicirello/permutations/class-use/Permutation.html
+++ b/docs/api/org/cicirello/permutations/class-use/Permutation.html
@@ -391,9 +391,7 @@
Uses of int
ScrambleDistance.distance(Permutation p1,
Permutation p2) |
-
- Measures the distance between two permutations.
- |
+ |
int |
@@ -408,7 +406,8 @@
@@ -425,7 +424,8 @@
@@ -458,7 +458,7 @@
@@ -474,7 +474,8 @@
diff --git a/docs/api/org/cicirello/permutations/distance/AcyclicEdgeDistance.html b/docs/api/org/cicirello/permutations/distance/AcyclicEdgeDistance.html
index 08eb0043..92a9de15 100644
--- a/docs/api/org/cicirello/permutations/distance/AcyclicEdgeDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/AcyclicEdgeDistance.html
@@ -301,6 +301,8 @@ distance
p2
- second permutation
Returns:
distance between p1 and p2
+Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -311,6 +313,7 @@ distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -338,6 +341,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -348,6 +353,7 @@ distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -377,6 +383,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/BlockInterchangeDistance.html b/docs/api/org/cicirello/permutations/distance/BlockInterchangeDistance.html
index a0c984fc..87f97aa4 100644
--- a/docs/api/org/cicirello/permutations/distance/BlockInterchangeDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/BlockInterchangeDistance.html
@@ -298,6 +298,8 @@ distance
p2
- second permutation
Returns:
distance between p1 and p2
+Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -308,6 +310,7 @@ distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -335,6 +338,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -345,6 +350,7 @@ distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -374,6 +380,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/CyclicEdgeDistance.html b/docs/api/org/cicirello/permutations/distance/CyclicEdgeDistance.html
index ec0ff3cf..3d9ce510 100644
--- a/docs/api/org/cicirello/permutations/distance/CyclicEdgeDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/CyclicEdgeDistance.html
@@ -301,6 +301,8 @@ distance
p2
- second permutation
Returns:
distance between p1 and p2
+Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -311,6 +313,7 @@ distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -338,6 +341,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -348,6 +353,7 @@ distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -377,6 +383,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/CyclicIndependentDistance.html b/docs/api/org/cicirello/permutations/distance/CyclicIndependentDistance.html
index 68a41f76..4a98a7a4 100644
--- a/docs/api/org/cicirello/permutations/distance/CyclicIndependentDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/CyclicIndependentDistance.html
@@ -207,7 +207,8 @@ Method Summary
distancef(Permutation p1,
Permutation p2) |
- Measures the distance between two permutations
+Measures the distance between two permutations, with cyclic independence:
+ distance = min_{i in [0,N)} distance(p1,rotate(p2,i))
|
@@ -277,6 +278,8 @@ distance
p2
- second permutation
Returns:
distance between p1 and p2
+Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -288,7 +291,8 @@ distance
distancef
public final double distancef(Permutation p1,
Permutation p2)
-
Measures the distance between two permutations
+Measures the distance between two permutations, with cyclic independence:
+ distance = min_{i in [0,N)} distance(p1,rotate(p2,i))
- Specified by:
distancef
in interface PermutationDistanceMeasurerDouble
@@ -297,6 +301,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
diff --git a/docs/api/org/cicirello/permutations/distance/CyclicIndependentDistanceDouble.html b/docs/api/org/cicirello/permutations/distance/CyclicIndependentDistanceDouble.html
index f05a119a..3ee0c6f6 100644
--- a/docs/api/org/cicirello/permutations/distance/CyclicIndependentDistanceDouble.html
+++ b/docs/api/org/cicirello/permutations/distance/CyclicIndependentDistanceDouble.html
@@ -269,6 +269,8 @@ distancef
p2
- second permutation
Returns:
distance between p1 and p2
+Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
diff --git a/docs/api/org/cicirello/permutations/distance/CyclicRTypeDistance.html b/docs/api/org/cicirello/permutations/distance/CyclicRTypeDistance.html
index dbad97e7..c8df02ff 100644
--- a/docs/api/org/cicirello/permutations/distance/CyclicRTypeDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/CyclicRTypeDistance.html
@@ -303,6 +303,8 @@ distance
p2
- second permutation
Returns:
distance between p1 and p2
+Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -313,6 +315,7 @@ distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -340,6 +343,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -350,6 +355,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -379,6 +385,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/CyclicReversalIndependentDistance.html b/docs/api/org/cicirello/permutations/distance/CyclicReversalIndependentDistance.html
index bf349856..cf577a3f 100644
--- a/docs/api/org/cicirello/permutations/distance/CyclicReversalIndependentDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/CyclicReversalIndependentDistance.html
@@ -208,7 +208,8 @@
Method Summary
distancef(Permutation p1,
Permutation p2) |
- Measures the distance between two permutations
+Measures the distance between two permutations, with cyclic and reversal independence:
+ distance = min_{i in [0,N)} { distance(p1,rotate(p2,i)), distance(p1,rotate(reverse(p2),i)) }
|
@@ -278,6 +279,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -289,7 +292,8 @@
distance
distancef
public final double distancef(Permutation p1,
Permutation p2)
-
Measures the distance between two permutations
+
Measures the distance between two permutations, with cyclic and reversal independence:
+ distance = min_{i in [0,N)} { distance(p1,rotate(p2,i)), distance(p1,rotate(reverse(p2),i)) }
- Specified by:
distancef
in interface PermutationDistanceMeasurerDouble
@@ -298,6 +302,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
diff --git a/docs/api/org/cicirello/permutations/distance/CyclicReversalIndependentDistanceDouble.html b/docs/api/org/cicirello/permutations/distance/CyclicReversalIndependentDistanceDouble.html
index 7eaa3128..1ea05172 100644
--- a/docs/api/org/cicirello/permutations/distance/CyclicReversalIndependentDistanceDouble.html
+++ b/docs/api/org/cicirello/permutations/distance/CyclicReversalIndependentDistanceDouble.html
@@ -270,6 +270,8 @@
distancef
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
diff --git a/docs/api/org/cicirello/permutations/distance/DeviationDistance.html b/docs/api/org/cicirello/permutations/distance/DeviationDistance.html
index c4a5d283..02b87b58 100644
--- a/docs/api/org/cicirello/permutations/distance/DeviationDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/DeviationDistance.html
@@ -301,6 +301,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -311,6 +313,7 @@
distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -338,6 +341,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -348,6 +353,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -377,6 +383,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/DeviationDistanceNormalized.html b/docs/api/org/cicirello/permutations/distance/DeviationDistanceNormalized.html
index 631ba6c2..eec37526 100644
--- a/docs/api/org/cicirello/permutations/distance/DeviationDistanceNormalized.html
+++ b/docs/api/org/cicirello/permutations/distance/DeviationDistanceNormalized.html
@@ -293,6 +293,8 @@
distancef
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -303,6 +305,7 @@
distancef
maxf
public double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -332,6 +335,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/DeviationDistanceNormalized2005.html b/docs/api/org/cicirello/permutations/distance/DeviationDistanceNormalized2005.html
index 76efd9fd..09128684 100644
--- a/docs/api/org/cicirello/permutations/distance/DeviationDistanceNormalized2005.html
+++ b/docs/api/org/cicirello/permutations/distance/DeviationDistanceNormalized2005.html
@@ -307,6 +307,8 @@
distancef
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -317,6 +319,7 @@
distancef
maxf
public double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -346,6 +349,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/EditDistance.html b/docs/api/org/cicirello/permutations/distance/EditDistance.html
index 96b107af..3011e463 100644
--- a/docs/api/org/cicirello/permutations/distance/EditDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/EditDistance.html
@@ -227,7 +227,7 @@
Method Summary
distancef(Permutation p1,
Permutation p2) |
- Measures the distance between two permutations
+Measures the distance between two permutations.
|
@@ -301,7 +301,7 @@
Method Detail
distancef
public double distancef(Permutation p1,
Permutation p2)
-
Measures the distance between two permutations
+
Measures the distance between two permutations.
- Specified by:
distancef
in interface PermutationDistanceMeasurerDouble
diff --git a/docs/api/org/cicirello/permutations/distance/ExactMatchDistance.html b/docs/api/org/cicirello/permutations/distance/ExactMatchDistance.html
index ccaabb2f..ca9a2d3e 100644
--- a/docs/api/org/cicirello/permutations/distance/ExactMatchDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/ExactMatchDistance.html
@@ -292,6 +292,8 @@ distance
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -302,6 +304,7 @@
distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -329,6 +332,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -339,6 +344,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -368,6 +374,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/InterchangeDistance.html b/docs/api/org/cicirello/permutations/distance/InterchangeDistance.html
index 5d3d9bf5..9abf661b 100644
--- a/docs/api/org/cicirello/permutations/distance/InterchangeDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/InterchangeDistance.html
@@ -299,6 +299,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -309,6 +311,7 @@
distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -336,6 +339,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -346,6 +351,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -375,6 +381,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/KendallTauDistance.html b/docs/api/org/cicirello/permutations/distance/KendallTauDistance.html
index 7940017a..49d68748 100644
--- a/docs/api/org/cicirello/permutations/distance/KendallTauDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/KendallTauDistance.html
@@ -305,6 +305,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -315,6 +317,7 @@
distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -342,6 +345,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -352,6 +357,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -381,6 +387,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/LeeDistance.html b/docs/api/org/cicirello/permutations/distance/LeeDistance.html
index 714998d6..ee5f802a 100644
--- a/docs/api/org/cicirello/permutations/distance/LeeDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/LeeDistance.html
@@ -302,6 +302,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -312,6 +314,7 @@
distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -339,6 +342,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -349,6 +354,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -378,6 +384,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/NormalizedPermutationDistanceMeasurerDouble.html b/docs/api/org/cicirello/permutations/distance/NormalizedPermutationDistanceMeasurerDouble.html
index 86e1753b..0f9d913a 100644
--- a/docs/api/org/cicirello/permutations/distance/NormalizedPermutationDistanceMeasurerDouble.html
+++ b/docs/api/org/cicirello/permutations/distance/NormalizedPermutationDistanceMeasurerDouble.html
@@ -206,6 +206,8 @@
normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/PermutationDistanceMeasurer.html b/docs/api/org/cicirello/permutations/distance/PermutationDistanceMeasurer.html
index c0bd6a22..f1a72fa5 100644
--- a/docs/api/org/cicirello/permutations/distance/PermutationDistanceMeasurer.html
+++ b/docs/api/org/cicirello/permutations/distance/PermutationDistanceMeasurer.html
@@ -205,6 +205,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
diff --git a/docs/api/org/cicirello/permutations/distance/PermutationDistanceMeasurerDouble.html b/docs/api/org/cicirello/permutations/distance/PermutationDistanceMeasurerDouble.html
index d6828e1a..4ef86c0e 100644
--- a/docs/api/org/cicirello/permutations/distance/PermutationDistanceMeasurerDouble.html
+++ b/docs/api/org/cicirello/permutations/distance/PermutationDistanceMeasurerDouble.html
@@ -198,6 +198,8 @@
distancef
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
diff --git a/docs/api/org/cicirello/permutations/distance/RTypeDistance.html b/docs/api/org/cicirello/permutations/distance/RTypeDistance.html
index 7d91326f..f5f01b6a 100644
--- a/docs/api/org/cicirello/permutations/distance/RTypeDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/RTypeDistance.html
@@ -302,6 +302,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -312,6 +314,7 @@
distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -339,6 +342,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -349,6 +354,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -378,6 +384,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/ReinsertionDistance.html b/docs/api/org/cicirello/permutations/distance/ReinsertionDistance.html
index 76905a18..d3b600fa 100644
--- a/docs/api/org/cicirello/permutations/distance/ReinsertionDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/ReinsertionDistance.html
@@ -316,6 +316,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -326,6 +328,7 @@
distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -353,6 +356,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -363,6 +368,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -392,6 +398,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/ReversalDistance.html b/docs/api/org/cicirello/permutations/distance/ReversalDistance.html
index b568de6f..92bb0065 100644
--- a/docs/api/org/cicirello/permutations/distance/ReversalDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/ReversalDistance.html
@@ -283,7 +283,7 @@
Constructor Detail
ReversalDistance
public ReversalDistance()
-Construct the distance measure. Default handles permutations of length n=10
+Construct the distance measure. Default handles permutations of length n=5.
@@ -327,6 +327,12 @@ distance
p2
- second permutation
Returns:
distance between p1 and p2
+Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
+IllegalArgumentException
- if length of the permutations
+ is not equal to the
+ the permutation length for which this was configured at time
+ of construction.
@@ -344,6 +350,10 @@ max
length
- Permutation length.
Returns:
the maximum distance between a pair of permutations of the specified length.
+Throws:
+IllegalArgumentException
- if length is not equal to the
+ the permutation length for which this was configured at time
+ of construction.
@@ -364,6 +374,8 @@ distancef
p2
- second permutation
Returns:
distance between p1 and p2
+Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -374,6 +386,7 @@ distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -403,6 +416,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/ReversalIndependentDistance.html b/docs/api/org/cicirello/permutations/distance/ReversalIndependentDistance.html
index 6904b7d4..6c116a35 100644
--- a/docs/api/org/cicirello/permutations/distance/ReversalIndependentDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/ReversalIndependentDistance.html
@@ -207,7 +207,8 @@ Method Summary
distancef(Permutation p1,
Permutation p2) |
- Measures the distance between two permutations
+Measures the distance between two permutations, with reversal independence:
+ distance = min { distance(p1,p2), distance(p1,reverse(p2)) }
|
@@ -277,6 +278,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -288,7 +291,8 @@
distance
distancef
public final double distancef(Permutation p1,
Permutation p2)
-
Measures the distance between two permutations
+
Measures the distance between two permutations, with reversal independence:
+ distance = min { distance(p1,p2), distance(p1,reverse(p2)) }
- Specified by:
distancef
in interface PermutationDistanceMeasurerDouble
@@ -297,6 +301,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
diff --git a/docs/api/org/cicirello/permutations/distance/ReversalIndependentDistanceDouble.html b/docs/api/org/cicirello/permutations/distance/ReversalIndependentDistanceDouble.html
index 48f1be6d..0d616213 100644
--- a/docs/api/org/cicirello/permutations/distance/ReversalIndependentDistanceDouble.html
+++ b/docs/api/org/cicirello/permutations/distance/ReversalIndependentDistanceDouble.html
@@ -269,6 +269,8 @@
distancef
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
diff --git a/docs/api/org/cicirello/permutations/distance/ScrambleDistance.html b/docs/api/org/cicirello/permutations/distance/ScrambleDistance.html
index e84f65d9..1e30606c 100644
--- a/docs/api/org/cicirello/permutations/distance/ScrambleDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/ScrambleDistance.html
@@ -284,6 +284,7 @@
Method Detail
distance
public int distance(Permutation p1,
Permutation p2)
+
Measures the distance between two permutations.
- Parameters:
@@ -301,6 +302,7 @@ distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -328,6 +330,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -338,6 +342,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -367,6 +372,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/permutations/distance/SquaredDeviationDistance.html b/docs/api/org/cicirello/permutations/distance/SquaredDeviationDistance.html
index 46533d2f..04c24004 100644
--- a/docs/api/org/cicirello/permutations/distance/SquaredDeviationDistance.html
+++ b/docs/api/org/cicirello/permutations/distance/SquaredDeviationDistance.html
@@ -302,6 +302,8 @@
distance
p2
- second permutation
Returns:
distance between p1 and p2
+
Throws:
+
IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -312,6 +314,7 @@
distance
max
public int max(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -339,6 +342,8 @@ distancef
p2
- second permutation
- Returns:
- distance between p1 and p2
+- Throws:
+IllegalArgumentException
- if p1.length() is not equal to p2.length().
@@ -349,6 +354,7 @@
distancef
maxf
public final double maxf(int length)
+
Computes the maximum possible distance between permutations
of a specified length.
@@ -378,6 +384,8 @@ normalizedDistance
p2
- 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().
diff --git a/docs/api/org/cicirello/sequences/distance/KendallTauSequenceDistance.html b/docs/api/org/cicirello/sequences/distance/KendallTauSequenceDistance.html
index 91ca5f2c..8101875b 100644
--- a/docs/api/org/cicirello/sequences/distance/KendallTauSequenceDistance.html
+++ b/docs/api/org/cicirello/sequences/distance/KendallTauSequenceDistance.html
@@ -186,9 +186,9 @@
Class KendallTauSeque
assumes permutations of the integers from 0 to N-1.
This distance metric, and both algorithms, is first described in the paper:
- V.A. Cicirello, "Kendall Tau
+ V.A. Cicirello, "Kendall Tau
Sequence Distance: Extending Kendall Tau from Ranks to Sequences,"
- arXiv preprint arXiv:1905.02752 [cs.DM], May 2019.
+ Industrial Networks and Intelligent Systems, 7(23), Article e1, April 2020.
diff --git a/docs/sitemap.xml b/docs/sitemap.xml
index 388abd79..f21732d4 100644
--- a/docs/sitemap.xml
+++ b/docs/sitemap.xml
@@ -34,7 +34,7 @@