commons-statistics-regression/src/main/java/org/apache/commons/statistics/regression/util/matrix/StatisticsMatrix.java
/**
     * Retrieves internal array data converted from it's 1D format to 2D.
     *
     * @return 2D array
     */
Retrieves internal array data converted from it's 1D format to 2D.
@return 2D array
Retrieves internal array data converted from it ' s 1D format to 2D . @return 2D array
public double[][] toArray2D() {
        int rows = this.getDDRM().numRows;
        int cols = this.getDDRM().numCols;
        double[][] retArr = new double[rows][cols];
        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < cols; j++) {
                retArr[i][j] = this.getDDRM().get(i, j);
            }
        }
        return retArr;
    }
public double [ ] [ ] toArray2D ( ) { int rows = this . getDDRM ( ) . numRows ; int cols = this . getDDRM ( ) . numCols ; double [ ] [ ] retArr = new double [ rows ] [ cols ] ; for ( int i = 0 ; i < rows ; i ++ ) { for ( int j = 0 ; j < cols ; j ++ ) { retArr [ i ] [ j ] = this . getDDRM ( ) . get ( i , j ) ; } } return retArr ; }
Retrieves internal array data converted from it's 1D format to 2D.
Retrieves internal array data converted from it ' s 1D format to 2D .