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.booleannextBool()doubleNext double.doublenextDouble(double min, double max, double step, int roundTo)doubleNext gaussian.intnextInt(int bound)Next int.intnextInt(int min, int max, int step)longnextLong()Next long.booleanprobability(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)
-