public static DMatrixRMaj convert(DMatrixRBlock src , DMatrixRMaj dst ) {
        if( dst != null ) {
            dst.reshape(src.getNumRows(),src.getNumCols());
        } else {
            dst = new DMatrixRMaj(src.numRows,src.numCols);
        }

        for( int i = 0; i < src.numRows; i += src.blockLength ) {
            int blockHeight = Math.min( src.blockLength , src.numRows - i);

            for( int j = 0; j < src.numCols; j += src.blockLength ) {
                int blockWidth = Math.min( src.blockLength , src.numCols - j);

                int indexSrc = i*src.numCols + blockHeight*j;
                int indexDstRow = i*dst.numCols + j;

                for( int k = 0; k < blockHeight; k++ ) {
                    System.arraycopy(src.data,indexSrc,dst.data,indexDstRow,blockWidth);
                    indexSrc += blockWidth;
                    indexDstRow += dst.numCols;
                }
            }
        }

        return dst;
    }
public static DMatrixRMaj convert ( DMatrixRBlock src , DMatrixRMaj dst ) { if ( dst != null ) { dst . reshape ( src . getNumRows ( ) , src . getNumCols ( ) ) ; } else { dst = new DMatrixRMaj ( src . numRows , src . numCols ) ; } for ( int i = 0 ; i < src . numRows ; i += src . blockLength ) { int blockHeight = Math . min ( src . blockLength , src . numRows - i ) ; for ( int j = 0 ; j < src . numCols ; j += src . blockLength ) { int blockWidth = Math . min ( src . blockLength , src . numCols - j ) ; int indexSrc = i * src . numCols + blockHeight * j ; int indexDstRow = i * dst . numCols + j ; for ( int k = 0 ; k < blockHeight ; k ++ ) { System . arraycopy ( src . data , indexSrc , dst . data , indexDstRow , blockWidth ) ; indexSrc += blockWidth ; indexDstRow += dst . numCols ; } } } return dst ; }
Converts {@link DMatrixRBlock} into {@link DMatrixRMaj}

@param src Input matrix.
@param dst Output matrix.  If null a new matrix will be declared.
@return Converted matrix.