Vector v = new RandomAccessSparseVector(50);
v.assign(1.0);
Matrix m = SolverTest.randomSequentialAccessSparseMatrix(100, 90, 50, 20, 1.0);
DistributedRowMatrix dm = randomDistributedMatrix(100, 90, 50, 20, 1.0, false);
Vector expected = m.timesSquared(v);
Vector actual = dm.timesSquared(v);
assertEquals(0.0, expected.getDistanceSquared(actual), 1.0e-9);
}
public void testMatrixTimesMatrix() throws Exception {