org.placelab.particlefilter
Class Gaussian
java.lang.Object
org.placelab.particlefilter.Gaussian
- Direct Known Subclasses:
- MeanEstimateForFixedVarianceGaussian
- public class Gaussian
- extends java.lang.Object
This is a one-dimensional gaussian. If you want to extend it to multiple dimensions,
you'll have to change the 'double's representing position to some n-dimensional position
representation, although a static bivariate gaussian computation is included.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Gaussian
public Gaussian(double mean,
double sigma)
Gaussian
public Gaussian(Gaussian g)
getHeightAt
public double getHeightAt(double p)
univariate
public static double univariate(double p,
double mean,
double sigma)
- Compute the Gaussian distribution function value.
- See Also:
bivariate(double,double,double,double,double,double,double)
bivariate
public static double bivariate(double x,
double y,
double mean_x,
double mean_y,
double sd_x,
double sd_y,
double rho)
- Compute the bivariate Gaussian distribution function value.
- Parameters:
rho - The correlation coefficient [-1...1].- See Also:
univariate(double,double,double)
drawSample
public double drawSample()
drawSample
public double drawSample(java.util.Random randomizer)
smoothBy
public void smoothBy(Gaussian other)
smoothBy
public void smoothBy(double otherSigma)
multiplyBy
public void multiplyBy(Gaussian other)
getMean
public double getMean()
getSigma
public double getSigma()
setMean
public void setMean(double m)
setSigma
public void setSigma(double s)
toString
public java.lang.String toString()
fromString
public static Gaussian fromString(java.lang.String s)
main
public static void main(java.lang.String[] args)