Package org.highlife.api.methods
Class Randoms
java.lang.Object
org.highlife.api.methods.Randoms
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanchance(int target) static booleanchance(int target, int overall) static Randomstatic doublegetSeededDouble(String seed, double min, double max) static intgetSeededInt(String seed, int min, int max) static doublenextGammaRandom(int shape, int scale) static doublenextGaussianRandom(double mean, double sigma) static doublenextHypergeometricRandom(int populationSize, int numberOfSuccesses, int sampleSize) static doublenextLogNormalDistributionRandom(double scale, double shape) static doublerandom(double lower, double upper) static intrandom(int high) static intrandom(int min, int max) static longrandom(long min, long max) static voidsetSeed(long seed) static void
-
Constructor Details
-
Randoms
public Randoms()
-
-
Method Details
-
random
public static int random(int high) -
random
public static int random(int min, int max) -
nextLogNormalDistributionRandom
public static double nextLogNormalDistributionRandom(double scale, double shape) throws org.apache.commons.math3.exception.NotStrictlyPositiveException - Throws:
org.apache.commons.math3.exception.NotStrictlyPositiveException
-
random
public static double random(double lower, double upper) -
random
public static long random(long min, long max) -
nextGaussianRandom
public static double nextGaussianRandom(double mean, double sigma) -
nextHypergeometricRandom
public static double nextHypergeometricRandom(int populationSize, int numberOfSuccesses, int sampleSize) -
nextGammaRandom
public static double nextGammaRandom(int shape, int scale) -
setSeed
public static void setSeed(long seed) -
setSeed
-
getSecureRandom
-
chance
public static boolean chance(int target, int overall) -
chance
public static boolean chance(int target) -
getSeededInt
-
getSeededDouble
-