public class PDFTools
extends java.lang.Object
Constructor and Description |
---|
PDFTools() |
Modifier and Type | Method and Description |
---|---|
static double |
random()
Use this rather than Math.random(), to allow user to reproduce random results
by setting the seed.
|
static boolean |
sampleBoolean(PDF pdf)
Note: PDF treated as univariate (only first dimension considered).
|
static float |
sampleFloat(PDF pdf)
Note: PDF treated as univariate (only first dimension considered).
|
static int |
sampleInt(PDF pdf)
Note: PDF treated as univariate (only first dimension considered).
|
static void |
setSeed(long seed) |
public static int sampleInt(PDF pdf)
pdf
- The PDF from which to samplepublic static boolean sampleBoolean(PDF pdf)
pdf
- The PDF from which to samplepublic static float sampleFloat(PDF pdf)
pdf
- The PDF from which to samplepublic static double random()
public static void setSeed(long seed)
seed
- New random seed for random()