@Test
public void testQuadraticForm() {

    Matrix X = new Matrix(5, 8);
    X.randomize();
    Matrix S = SymmetricMatrix.XXt(X);
    DataBlock x = new DataBlock(S.getRowsCount());
    x.randomize();
    assertEquals(SymmetricMatrix.quadraticForm(S, x.getData()), SymmetricMatrix.quadraticForm(S, x), 1e-9);
}