Collection<Cooccurrence> cooccurrences = new LinkedList<Cooccurrence>();
for (int n = 0; n < numberOfColumns; n++) {
double valueA = v1.get(n);
double valueB = v2.get(n);
if (valueA != 0.0 && valueB != 0.0) {
cooccurrences.add(new Cooccurrence(n, valueA, valueB));
}
}
double result = similarity.similarity(rowA, rowB, cooccurrences, weightA, weightB, numberOfColumns);
assertEquals(expectedSimilarity, result, EPSILON);