jblas-project / jblas

Linear Algebra for Java
http://jblas.org
BSD 3-Clause "New" or "Revised" License
590 stars 149 forks source link

Ability to set random seed #15

Closed RichDickClark closed 12 years ago

RichDickClark commented 12 years ago

It would be nice if the results of DoubleMatrix.rand() were reproducable. We need a way to set the seed used by the java.util.Random object DoubleMatrix.rand() is using.

mikiobraun commented 12 years ago

Hi Rich,

sorry for the late reply. I'm internally getting all my random numbers from org.jblas.util.Random which also has a method seed() which let's you set the seed. That should solve your problem.

Best,

Mikio