150 |
|
* |
151 |
|
* @param seed the initial seed |
152 |
|
*/ |
153 |
< |
synchronized public void setSeed(long seed) { |
153 |
> |
public synchronized void setSeed(long seed) { |
154 |
|
this.seed.set(initialScramble(seed)); |
155 |
|
haveNextNextGaussian = false; |
156 |
|
} |
493 |
|
* standard deviation {@code 1.0} from this random number |
494 |
|
* generator's sequence |
495 |
|
*/ |
496 |
< |
synchronized public double nextGaussian() { |
496 |
> |
public synchronized double nextGaussian() { |
497 |
|
// See Knuth, ACP, Section 3.4.1 Algorithm C. |
498 |
|
if (haveNextNextGaussian) { |
499 |
|
haveNextNextGaussian = false; |
551 |
|
/** |
552 |
|
* Save the {@code Random} instance to a stream. |
553 |
|
*/ |
554 |
< |
synchronized private void writeObject(ObjectOutputStream s) |
554 |
> |
private synchronized void writeObject(ObjectOutputStream s) |
555 |
|
throws IOException { |
556 |
|
|
557 |
|
// set the values of the Serializable fields |