|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectca.nengo.math.PDFTools
public class PDFTools
Convenience methods for using PDFs.
| Constructor Summary | |
|---|---|
PDFTools()
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PDFTools()
| Method Detail |
|---|
public static int sampleInt(PDF pdf)
pdf - The PDF from which to sample
public static boolean sampleBoolean(PDF pdf)
pdf - The PDF from which to sample
public static float sampleFloat(PDF pdf)
pdf - The PDF from which to sample
public static double random()
public static void setSeed(long seed)
seed - New random seed for random()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||