Equivalent method in java (numpy.random.normal(mean,var)) -


is there method in java equivalent numpy.random.normal(mean,variance).

you can use java.util.random class:

random r = new random(); double randomvalue = mean + r.nextgaussian()*variance; 

note if need multiple random values, can use r multiple times. can supply constructor specific seed random r = new random(1234);.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -