org.placelab.particlefilter
Class Gaussian

java.lang.Object
  extended byorg.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.


Constructor Summary
Gaussian(double mean, double sigma)
           
Gaussian(Gaussian g)
           
 
Method Summary
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.
 double drawSample()
           
 double drawSample(java.util.Random randomizer)
           
static Gaussian fromString(java.lang.String s)
           
 double getHeightAt(double p)
           
 double getMean()
           
 double getSigma()
           
static void main(java.lang.String[] args)
           
 void multiplyBy(Gaussian other)
           
 void setMean(double m)
           
 void setSigma(double s)
           
 void smoothBy(double otherSigma)
           
 void smoothBy(Gaussian other)
           
 java.lang.String toString()
           
static double univariate(double p, double mean, double sigma)
          Compute the Gaussian distribution function value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Gaussian

public Gaussian(double mean,
                double sigma)

Gaussian

public Gaussian(Gaussian g)
Method Detail

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)