Package org.highlife.api.methods
Class Calculations
java.lang.Object
org.highlife.api.methods.Calculations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanchance(int target) static booleanchance(int target, int overall) static doubledistance(int x1, int y1, int x2, int y2) static doublestatic doublestatic longelapsed(long prevTime) static Stringstatic Randomstatic booleanisBefore(long futureTime) 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 voidsetRandomSeed(long seed)
-
Constructor Details
-
Calculations
public Calculations()
-
-
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) -
setRandomSeed
public static void setRandomSeed(long seed) -
distance
-
distance
-
distance
public static double distance(int x1, int y1, int x2, int y2) -
getRandom
-
isBefore
public static boolean isBefore(long futureTime) -
elapsed
public static long elapsed(long prevTime) -
generateRandomString
-
chance
public static boolean chance(int target, int overall) -
chance
public static boolean chance(int target)
-