Ich habe durch die Dokumentation von Apache gemeinsamen Kern Mathematik-Bibliothek Spülung für diese Antwort zu suchen, aber havent die Antwort in der Lage zu finden .. http://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math4/linear/RealMatrix.htmlConstructing Nullmatrix in Apache Commons Bibliothek in Java
Wie wir bauen oder initialisiere eine Matrix mit dem Standardwert.
So sehe ich wir können das tun
RealMatrix X = new BlockRealMatrix(numRows, numCols);
or
double[][] matrixData = { {1d,2d,3d}, {2d,5d,3d}};
RealMatrix m = MatrixUtils.createRealMatrix(matrixData);
Aber wie konstruiere ich eine Matrix und initialisieren sie alle (sagen wir) 2 .. (oder 0 in meinem Fall), anstatt die explizit die Schaffung double[][]
Dank