public class ExtendedPseudoRandomGenerator extends Object implements PseudoRandomGenerator
| Constructor and Description |
|---|
ExtendedPseudoRandomGenerator(PseudoRandomGenerator randomGenerator) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName() |
long |
getSeed() |
double |
nextDouble() |
double |
nextDouble(double lowerBound,
double upperBound) |
int |
nextInt(int lowerBound,
int upperBound) |
double |
randNormal(double mean,
double standardDeviation)
Use the polar form of the Box-Muller transformation to obtain
a pseudo random number from a Gaussian distribution
Code taken from Maurice Clerc's implementation
|
double[] |
randSphere(int dimension)
Get a random point from an hypersphere (center = 0, radius = 1)
Code taken from Maurice Clerc's implementation
|
double[] |
randSphere(int dimension,
double center,
double radius)
Ger a random point from an hypersphere
Code taken from Maurice Clerc's implementation
|
void |
setSeed(long seed) |
public ExtendedPseudoRandomGenerator(PseudoRandomGenerator randomGenerator)
public int nextInt(int lowerBound,
int upperBound)
nextInt in interface PseudoRandomGeneratorpublic double nextDouble(double lowerBound,
double upperBound)
nextDouble in interface PseudoRandomGeneratorpublic double nextDouble()
nextDouble in interface PseudoRandomGeneratorpublic void setSeed(long seed)
setSeed in interface PseudoRandomGeneratorpublic long getSeed()
getSeed in interface PseudoRandomGeneratorpublic String getName()
getName in interface PseudoRandomGeneratorpublic double randNormal(double mean,
double standardDeviation)
mean - standardDeviation - public double[] randSphere(int dimension)
dimension - public double[] randSphere(int dimension,
double center,
double radius)
center - radius - Copyright © 2018. All rights reserved.