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

DoubleMatrix org::jblas::la::DoubleMatrix::repmat ( int  rowMult,
int  columnMult 
) [inline]

Generate a new matrix which has the given number of replications of this.

Definition at line 965 of file DoubleMatrix.java.

References columns, DoubleMatrix(), put(), and rows.

                                                            {
        DoubleMatrix result = new DoubleMatrix(rows * rowMult, columns * columnMult);

        for (int c = 0; c < columnMult; c++)
            for (int r = 0; r < rowMult; r++)
                for (int i = 0; i < rows; i++)
                    for (int j = 0; j < columns; j++)
                        result.put(r * rows + i, c * columns + j, get(i, j));
        return result;
    }


Generated by  Doxygen 1.6.0   Back to index