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

static DoubleMatrix org::jblas::la::DoubleMatrix::rand ( int  rows,
int  columns 
) [inline, static]

Create matrix with random values uniformly in 0..1.

Definition at line 375 of file DoubleMatrix.java.

References data, and DoubleMatrix().

Referenced by rand().

        DoubleMatrix m = new DoubleMatrix(rows, columns);

        java.util.Random r = new java.util.Random();
        for (int i = 0; i < rows * columns; i++) {
            m.data[i] = r.nextDouble();

        return m;

Generated by  Doxygen 1.6.0   Back to index