question: public static DoubleVector rnorm ( int n , double mean , double sd , Random random ) { if ( sd < 0.0 ) throw new IllegalArgumentException ( "standard deviation < 0.0" ) ; if ( sd == 0.0 ) return new DoubleVector ( n , mean ) ; DoubleVector v = new DoubleVector ( n ) ; for ( int i = 0 ; i < n ; i ++ ) v . set ( i , ( random . nextGaussian ( ) + mean ) / sd ) ; return v ; }
target:  Generates a sample of a normal distribution.