mirror of
https://github.com/apache/commons-math.git
synced 2025-03-03 06:59:11 +00:00
the new base class does not call setSeed,
defensive programming against too early calls to setSeed are not useful anymore git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@797246 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
441880be46
commit
648a02f0b4
@ -202,12 +202,6 @@ public class MersenneTwister extends BitsStreamGenerator implements Serializable
|
||||
* @param seed the initial seed (64 bits integer)
|
||||
*/
|
||||
public void setSeed(long seed) {
|
||||
if (mt == null) {
|
||||
// this is probably a spurious call from base class constructor,
|
||||
// we do nothing and wait for the setSeed in our own
|
||||
// constructors after array allocation
|
||||
return;
|
||||
}
|
||||
setSeed(new int[] { (int) (seed >>> 32), (int) (seed & 0xffffffffl) });
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user