}
public void testIncrementValue ()
{
SparseVector s = (SparseVector) s1.cloneMatrix ();
s.incrementValue (5, 0.75);
double[] ans = new double[] {1, 2.75, 3, 4, 5};
for (int i = 0; i < s.numLocations(); i++) {
assertTrue (s.valueAtLocation (i) == ans[i]);
}