@Test
public void testDot() throws Exception {

    DenseVector vec1 = new DenseVector(new double[]{1, 2, -3});
    DenseVector vec2 = new DenseVector(new double[]{3, 2, 1});
    Assert.assertEquals(vec1.dot(vec2), 3 + 4 - 3, TOL);
}