List of usage examples for org.apache.mahout.math DenseMatrix numCols
@Override public int numCols()
From source file:org.qcri.pca.CompositeJobTest.java
License:Apache License
private void verifyXtX(DenseMatrix xtxMatrix) { Assert.assertEquals("The computed xtx must have " + xsize + " rows!", xsize, xtxMatrix.numRows()); Assert.assertEquals("The computed xtx must have " + xsize + " cols!", xsize, xtxMatrix.numCols()); for (int r = 0; r < xsize; r++) for (int c = 0; c < xsize; c++) Assert.assertEquals("The xtx[" + r + "][" + c + "] is incorrect: ", xtx[r][c], xtxMatrix.get(r, c), EPSILON);/*from w ww. j a va2s .c o m*/ }