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

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

Create matrix with normally distributed random values.

Definition at line 392 of file DoubleMatrix.java.

References data, and DoubleMatrix().

Referenced by randn().

                                                            {
        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] = (double) r.nextGaussian();
        }

        return m;
    }


Generated by  Doxygen 1.6.0   Back to index