mirror of
https://github.com/apache/lucene.git
synced 2025-03-04 07:19:18 +00:00
SOLR-1302 -- Fixing infinite norm calculation
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@911153 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f037de128c
commit
d85bb64392
@ -70,7 +70,7 @@ public class DistanceUtils {
|
||||
result = Math.sqrt(squaredEuclideanDistance(vec1, vec2));
|
||||
} else if (power == Integer.MAX_VALUE || Double.isInfinite(power)) {//infininte norm?
|
||||
for (int i = 0; i < vec1.length; i++) {
|
||||
result = Math.max(vec1[i], vec2[i]);
|
||||
result = Math.max(result, Math.max(vec1[i], vec2[i]));
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < vec1.length; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user