Skip to content

Commit 7b0e3de

Browse files
authored
Add files via upload
1 parent 63b9102 commit 7b0e3de

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

P2J10Test.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ private static boolean[] conv(String bits) {
2525
@Test public void testDissimilarityExplicit() {
2626
boolean[] f1 = conv("10101");
2727
boolean[] s1 = conv("10101");
28-
assertEquals("0", P2J10.matchingDissimilarity(f1, s1).toString());
29-
assertEquals("0", P2J10.jaccardDissimilarity(f1, s1).toString());
30-
assertEquals("0", P2J10.diceDissimilarity(f1, s1).toString());
31-
assertEquals("0", P2J10.rogersTanimonoDissimilarity(f1, s1).toString());
28+
assertEquals(new Fraction(0).toString(), P2J10.matchingDissimilarity(f1, s1).toString());
29+
assertEquals(new Fraction(0).toString(), P2J10.jaccardDissimilarity(f1, s1).toString());
30+
assertEquals(new Fraction(0).toString(), P2J10.diceDissimilarity(f1, s1).toString());
31+
assertEquals(new Fraction(0).toString(), P2J10.rogersTanimonoDissimilarity(f1, s1).toString());
3232
assertEquals("2/5", P2J10.russellRaoDissimilarity(f1, s1).toString());
33-
assertEquals("0", P2J10.sokalSneathDissimilarity(f1, s1).toString());
33+
assertEquals(new Fraction(0).toString(), P2J10.sokalSneathDissimilarity(f1, s1).toString());
3434

3535
boolean[] f2 = conv("01111");
3636
boolean[] s2 = conv("00100");
@@ -79,12 +79,12 @@ private static boolean[] conv(String bits) {
7979

8080
boolean[] f7 = conv("01101");
8181
boolean[] s7 = conv("10010");
82-
assertEquals("1", P2J10.matchingDissimilarity(f7, s7).toString());
83-
assertEquals("1", P2J10.jaccardDissimilarity(f7, s7).toString());
84-
assertEquals("1", P2J10.diceDissimilarity(f7, s7).toString());
85-
assertEquals("1", P2J10.rogersTanimonoDissimilarity(f7, s7).toString());
86-
assertEquals("1", P2J10.russellRaoDissimilarity(f7, s7).toString());
87-
assertEquals("1", P2J10.sokalSneathDissimilarity(f7, s7).toString());
82+
assertEquals(new Fraction(1).toString(), P2J10.matchingDissimilarity(f7, s7).toString());
83+
assertEquals(new Fraction(1).toString(), P2J10.jaccardDissimilarity(f7, s7).toString());
84+
assertEquals(new Fraction(1).toString(), P2J10.diceDissimilarity(f7, s7).toString());
85+
assertEquals(new Fraction(1).toString(), P2J10.rogersTanimonoDissimilarity(f7, s7).toString());
86+
assertEquals(new Fraction(1).toString(), P2J10.russellRaoDissimilarity(f7, s7).toString());
87+
assertEquals(new Fraction(1).toString(), P2J10.sokalSneathDissimilarity(f7, s7).toString());
8888
}
8989

9090
private static final int N = 1000;

0 commit comments

Comments
 (0)