use of edu.ucsf.rbvi.clusterMaker2.internal.algorithms.matrix.ColtMatrix in project clusterMaker2 by RBVI.
the class MatrixTest method matrixSquareTest.
@Test
public void matrixSquareTest() {
initialize();
// First, simpleMatrix
timeStart();
Matrix resultSimple = simpleMatrix.ops().multiplyMatrix(simpleMatrix);
timeEnd("square multiply simple matrix");
// System.out.println("resultSimple: "+resultSimple.printMatrixInfo());
timeStart();
Matrix resultColt = coltMatrix.ops().multiplyMatrix(coltMatrix);
timeEnd("square multiply colt matrix");
// System.out.println("resultColt: "+resultColt.printMatrixInfo());
assertArrayEquals(resultSimple.toArray(), resultColt.toArray(), DELTA);
timeStart();
Matrix resultAlgo = ojAlgoMatrix.ops().multiplyMatrix(ojAlgoMatrix);
timeEnd("square multiply ojAlgo matrix");
// System.out.println("resultOjAlgo: "+ resultAlgo.printMatrixInfo());
assertArrayEquals(resultSimple.toArray(), resultAlgo.toArray(), DELTA);
}