assertEquals (3, binary2.dotProduct (binary1), 0.0001);
assertEquals (15.0, binary1.dotProduct (s1), 0.0001);
assertEquals (15.0, s1.dotProduct (binary1), 0.0001);
assertEquals (9.0, binary2.dotProduct (s1), 0.0001);
assertEquals (9.0, s1.dotProduct (binary2), 0.0001);
IndexedSparseVector dblVec = (IndexedSparseVector) s1.cloneMatrix ();
dblVec.plusEqualsSparse (binary1);
checkAnswer (dblVec, new double[] { 2, 3, 4, 5, 6 });