/** * Returns a string representation of the given matrix. * * @param matrix * the matrix to convert. */ protected String toString(AbstractMatrix2D matrix) { String[][] strings = this.format(matrix); align(strings); StringBuffer total = new StringBuffer(toString(strings)); if (printShape) total.insert(0, shape(matrix) + "\n"); return total.toString(); } }
/** * Returns a string representation of the given matrix. * * @param matrix * the matrix to convert. */ protected String toString(AbstractMatrix2D matrix) { String[][] strings = this.format(matrix); align(strings); StringBuffer total = new StringBuffer(toString(strings)); if (printShape) total.insert(0, shape(matrix) + "\n"); return total.toString(); } }