Package com.strategyquant.lib
Interface IRandomGenerator
public interface IRandomGenerator
The Interface IRandomGenerator.
-
Method Summary
Modifier and TypeMethodDescriptionclone(long seed)
Clone.Gets the random.newInstance(long seed)
New instance.boolean
nextBool()
double
Next double.double
nextDouble(double min, double max, double step, int roundTo)
double
Next gaussian.int
nextInt(int bound)
Next int.int
nextInt(int min, int max, int step)
long
nextLong()
Next long.boolean
probability(double functionProbability)
Probability.
-
Method Details
-
nextInt
int nextInt(int bound)Next int.- Parameters:
bound
- the bound- Returns:
- the int
-
newInstance
New instance.- Parameters:
seed
- the seed- Returns:
- the i random generator
-
nextDouble
double nextDouble()Next double.- Returns:
- the double
-
nextGaussian
double nextGaussian()Next gaussian.- Returns:
- the double
-
probability
boolean probability(double functionProbability)Probability.- Parameters:
functionProbability
- the function probability- Returns:
- true, if successful
-
getRandom
Random getRandom()Gets the random.- Returns:
- the random
-
nextLong
long nextLong()Next long.- Returns:
- the long
-
clone
Clone.- Parameters:
seed
- the seed- Returns:
- the i random generator
-
nextDouble
double nextDouble(double min, double max, double step, int roundTo) -
nextBool
boolean nextBool() -
nextInt
int nextInt(int min, int max, int step)
-