Search in sources :

Example 1 with ColtMatrix

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);
}
Also used : Matrix(edu.ucsf.rbvi.clusterMaker2.internal.api.Matrix) Test(org.junit.Test)

Aggregations

Matrix (edu.ucsf.rbvi.clusterMaker2.internal.api.Matrix)1 Test (org.junit.Test)1