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

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

Create matrix with normally distributed random values.

Definition at line 392 of file FloatMatrix.java.

References data, and FloatMatrix().

Referenced by randn().

        FloatMatrix m = new FloatMatrix(rows, columns);

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

        return m;

Generated by  Doxygen 1.6.0   Back to index