|
1 | 1 | /* |
2 | | - * Copyright 2018-2019 Vincent A. Cicirello, <https://www.cicirello.org/>. |
| 2 | + * Copyright 2018-2021 Vincent A. Cicirello, <https://www.cicirello.org/>. |
3 | 3 | * |
4 | 4 | * This file is part of JavaPermutationTools (https://jpt.cicirello.org/). |
5 | 5 | * |
|
72 | 72 | * assumes permutations of the integers from 0 to N-1.</p> |
73 | 73 | * |
74 | 74 | * <p>This distance metric, and both algorithms, is first described in the paper:<br> |
75 | | - * V.A. Cicirello, <a href="https://www.cicirello.org/publications/cicirello2019arXiv.html" target=_top>"Kendall Tau |
| 75 | + * V.A. Cicirello, <a href="https://www.cicirello.org/publications/eai.13-7-2018.163925.pdf" target=_top>"Kendall Tau |
76 | 76 | * Sequence Distance: Extending Kendall Tau from Ranks to Sequences,"</a> |
77 | | - * arXiv preprint arXiv:1905.02752 [cs.DM], May 2019.</p> |
| 77 | + * Industrial Networks and Intelligent Systems, 7(23), Article e1, April 2020.</p> |
78 | 78 | * |
79 | 79 | * @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>, <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a> |
80 | | - * @version 1.19.6.10 |
81 | | - * @since 1.1 |
| 80 | + * @version 1.30.2021 |
82 | 81 | */ |
83 | 82 | public final class KendallTauSequenceDistance extends AbstractSequenceDistanceMeasurer { |
84 | 83 |
|
@@ -112,8 +111,6 @@ public KendallTauSequenceDistance() { |
112 | 111 | * cost to hash objects, or if the objects are of a class that implements Comparable but |
113 | 112 | * which does not provide an implementation of hashCode.</p> |
114 | 113 | * |
115 | | - * @since 1.2.3 |
116 | | - * |
117 | 114 | * @param useAlternateAlg To use the alternate algorithm pass true. To use the default algorithm pass false. |
118 | 115 | */ |
119 | 116 | public KendallTauSequenceDistance(boolean useAlternateAlg) { |
@@ -411,7 +408,7 @@ private int relabelElementsWithHash(double[] s1, double[] s2, int[][] relabeling |
411 | 408 | } |
412 | 409 |
|
413 | 410 | private int relabelElementsWithHash(float[] s1, float[] s2, int[][] relabeling) { |
414 | | - DoubleHT labelMap = new DoubleHT((int)(1.334 * relabeling.length)+2); |
| 411 | + FloatHT labelMap = new FloatHT((int)(1.334 * relabeling.length)+2); |
415 | 412 | int current = -1; |
416 | 413 | for (int i = 0; i < relabeling.length; i++) { |
417 | 414 | if (!labelMap.containsKey(s1[i])) { |
|
0 commit comments