@@ -46,21 +46,13 @@ public void testExactMatchDistance() {
4646 int [] a4 = {0 , 3 , 2 , 1 , 4 , 5 };
4747 // testing with sequences of any one type should be sufficient, since the various sequence types have been separately tested,
4848 // and all of the individual distance methods delegate computation to a common method.
49- //PrimitiveSequence s1 = new PrimitiveSequence(a1);
50- //PrimitiveSequence s2 = new PrimitiveSequence(a2);
51- //PrimitiveSequence s3 = new PrimitiveSequence(a3);
52- //PrimitiveSequence s4 = new PrimitiveSequence(a4);
5349 assertEquals ("maximal distance" , 6 , d .distance (a1 ,a2 ));
5450 assertEquals ("end points differ" , 2 , d .distance (a1 ,a3 ));
5551 assertEquals ("differ in interior positions" , 2 , d .distance (a1 ,a4 ));
5652 int [] b1 = {0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 };
5753 int [] b2 = {5 , 0 , 1 , 2 , 3 , 4 , 6 , 7 , 8 };
5854 int [] b3 = {5 , 1 , 2 , 3 , 4 , 0 , 6 , 7 , 8 };
5955 int [] b4 = {0 , 3 , 2 , 1 , 4 , 5 , 6 , 7 , 8 };
60- //PrimitiveSequence t1 = new PrimitiveSequence(b1);
61- //PrimitiveSequence t2 = new PrimitiveSequence(b2);
62- //PrimitiveSequence t3 = new PrimitiveSequence(b3);
63- //PrimitiveSequence t4 = new PrimitiveSequence(b4);
6456 // tests with different length sequences
6557 assertEquals ("identical except for extras" , 3 , d .distance (a1 ,b1 ));
6658 assertEquals ("maximal distance" , 9 , d .distance (a1 ,b2 ));
@@ -194,25 +186,21 @@ private int naiveKendalTau(int[] s1, int[] s2) {
194186
195187
196188 private void identicalSequences (SequenceDistanceMeasurer d ) {
197- for (int n = 1 ; n <= 10 ; n ++) {
189+ for (int n = 0 ; n <= 10 ; n ++) {
198190 int [] a = new int [n ];
199191 for (int i = 0 ; i < n ; i ++) a [i ] = ThreadLocalRandom .current ().nextInt (100 );
200192 // testing with sequences of any one type should be sufficient, since the various sequence types have been separately tested,
201193 // and all of the individual distance methods delegate computation to a common method.
202- //PrimitiveSequence s = new PrimitiveSequence(a);
203- //PrimitiveSequence copy = s.copy();
204194 assertEquals ("distance of a sequence to itself should be 0" , 0 , d .distance (a , a .clone ()));
205195 }
206196 }
207197
208198 private void identicalSequencesD (SequenceDistanceMeasurerDouble d ) {
209- for (int n = 1 ; n <= 10 ; n ++) {
199+ for (int n = 0 ; n <= 10 ; n ++) {
210200 int [] a = new int [n ];
211201 for (int i = 0 ; i < n ; i ++) a [i ] = ThreadLocalRandom .current ().nextInt (100 );
212202 // testing with sequences of any one type should be sufficient, since the various sequence types have been separately tested,
213203 // and all of the individual distance methods delegate computation to a common method.
214- //PrimitiveSequence s = new PrimitiveSequence(a);
215- //PrimitiveSequence copy = s.copy();
216204 assertEquals ("distance of a sequence to itself should be 0" , 0.0 , d .distancef (a , a .clone ()), EPSILON );
217205 }
218206 }
0 commit comments