Example usage for org.apache.mahout.math Matrix columnSize

List of usage examples for org.apache.mahout.math Matrix columnSize

Introduction

In this page you can find the example usage for org.apache.mahout.math Matrix columnSize.

Prototype

int columnSize();

Source Link

Usage

From source file:org.carrot2.matrix.factorization.PartialSingularValueDecomposition.java

License:Open Source License

private static DenseDoubleMatrix2D toColtMatrix(Matrix m) {
    DenseDoubleMatrix2D result = new DenseDoubleMatrix2D(m.rowSize(), m.columnSize());
    for (int r = 0; r < result.rows(); r++) {
        for (int c = 0; c < result.columns(); c++) {
            result.setQuick(r, c, m.getQuick(r, c));
        }//from   w ww.ja v  a2 s.  co m
    }
    return result;
}