|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.nengo.math.impl.GaussianPDF
public class GaussianPDF
Univariate Gaussian probability density function.
| Constructor Summary | |
|---|---|
GaussianPDF()
Instantiates with default mean=0 and variance=1 |
|
GaussianPDF(float mean,
float variance)
|
|
GaussianPDF(float mean,
float variance,
float peak)
Constructs a scaled Gaussian with the given peak value. |
|
| Method Summary | |
|---|---|
PDF |
clone()
|
static float[] |
doSample()
This method is publically exposed because normal deviates are often needed, and static access allows the compiler to inline the call, which brings a small performance advantage. |
int |
getDimension()
|
float |
getMean()
|
float |
getPeak()
|
boolean |
getScalePeakWithVariance()
|
float |
getVariance()
|
float |
map(float[] from)
|
float[] |
multiMap(float[][] from)
|
float[] |
sample()
|
void |
setMean(float mean)
|
void |
setPeak(float peak)
|
void |
setScalePeakWithVariance(boolean scale)
|
void |
setVariance(float variance)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GaussianPDF(float mean,
float variance)
mean - Mean of the distributionvariance - Variance of the distribution
public GaussianPDF(float mean,
float variance,
float peak)
mean - Mean of the distributionvariance - Variance of the distributionpeak - Maximum value of scaled Gaussianpublic GaussianPDF()
| Method Detail |
|---|
public void setMean(float mean)
mean - Mean of the distributionpublic float getMean()
public void setVariance(float variance)
variance - Variance of the distributionpublic float getVariance()
public void setPeak(float peak)
peak - Maximum value of scaled Gaussianpublic float getPeak()
public void setScalePeakWithVariance(boolean scale)
scale - If true, the peak of the distribution scales automatically so that the integral is 1public boolean getScalePeakWithVariance()
public float[] sample()
sample in interface PDFPDF.sample()public static float[] doSample()
public int getDimension()
getDimension in interface FunctionFunction.getDimension()public float map(float[] from)
map in interface Functionfrom - Must have same length as getDimension()
Function.map(float[])public float[] multiMap(float[][] from)
multiMap in interface Functionfrom - An array of arguments; each element must have length getDimension().
Function.multiMap(float[][])
public PDF clone()
throws java.lang.CloneNotSupportedException
clone in interface Functionclone in interface PDFclone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||