@Test
public void testPlus() throws Exception {

    Vector d = v1.plus(v2);
    Assert.assertEquals(d.get(0), 0.0, TOL);
    Assert.assertEquals(d.get(1), 2.0, TOL);
    Assert.assertEquals(d.get(2), 0.0, TOL);
    Assert.assertEquals(d.get(3), 3.0, TOL);
    DenseVector dv = DenseVector.ones(8);
    dv = dv.plus(v2);
    Assert.assertArrayEquals(dv.getData(), new double[]{1, 1, 1, 2, 2, 2, 1, 1}, TOL);
}