Logo Search packages:      
Sourcecode: jblas version File versions  Download package

String org::jblas::la::DoubleMatrix::toString (  )  [inline]

Generate string representation of the matrix.

Definition at line 1154 of file DoubleMatrix.java.

References columns, and rows.

Referenced by org::jblas::la::Eigen::eigenvectors(), and print().

                             {
        StringBuilder s = new StringBuilder();

        s.append("[");

        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < columns; j++) {
                s.append(get(i, j));
                if (j < columns - 1) {
                    s.append(", ");
                }
            }
            if (i < rows - 1) {
                s.append("; ");
            }
        }

        s.append("]");

        return s.toString();
    }


Generated by  Doxygen 1.6.0   Back to index