Skip to content

Commit ee2b6e5

Browse files
authored
Merge pull request #12 from vpop/update/integral-division
Avoid integral division for Sørensen-Dice coefficient within StringSet
2 parents 0b69a69 + 97f3024 commit ee2b6e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/info/debatty/java/stringsimilarity/StringSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ public double sorensenDiceSimilarity(StringSet other) throws Exception {
5454
throw new Exception("Profiles were not created using the same kshingling object!");
5555
}
5656

57-
return 2 * this.vector.intersection(other.vector) / (this.vector.size() + other.vector.size());
57+
return 2.0 * this.vector.intersection(other.vector) / (this.vector.size() + other.vector.size());
5858
}
5959
}

0 commit comments

Comments
 (0)