SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.function.special
Class Gaussian

java.lang.Object
  extended by com.numericalmethod.suanshu.analysis.function.rn2r1.UnivariateRealFunction
      extended by com.numericalmethod.suanshu.analysis.function.special.Gaussian
All Implemented Interfaces:
Function, RealScalarFunction

public class Gaussian
extends UnivariateRealFunction

This computes the Gaussian function.

f(x) = a * exp{-(x - b)2 / 2 / c2}

See Also:
Wikipedia: Gaussian function

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.analysis.function.Function
Function.EvaluationException
 
Field Summary
 double a
          a as in f(x) = a * exp{-(x - b)2 / 2 / c2}
 double b
          b as in f(x) = a * exp{-(x - b)2 / 2 / c2}
 double c
          c as in f(x) = a * exp{-(x - b)2 / 2 / c2}
 
Constructor Summary
Gaussian()
          Construct an instance to compute the standard Gaussian function.
Gaussian(double a, double b, double c)
          Construct an instance to compute the Gaussian function.
 
Method Summary
 double evaluate(double x)
          Compute f(x).
 
Methods inherited from class com.numericalmethod.suanshu.analysis.function.rn2r1.UnivariateRealFunction
dimension4Domain, dimension4Range, evaluate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

public final double a
a as in f(x) = a * exp{-(x - b)2 / 2 / c2}


b

public final double b
b as in f(x) = a * exp{-(x - b)2 / 2 / c2}


c

public final double c
c as in f(x) = a * exp{-(x - b)2 / 2 / c2}

Constructor Detail

Gaussian

public Gaussian(double a,
                double b,
                double c)
Construct an instance to compute the Gaussian function.

Parameters:
a - a
b - b
c - c

Gaussian

public Gaussian()
Construct an instance to compute the standard Gaussian function.
f(x) = 1 / sqrt(2 / PI) * exp{- x2 / 2}

Method Detail

evaluate

public double evaluate(double x)
Description copied from class: UnivariateRealFunction
Compute f(x).

Specified by:
evaluate in class UnivariateRealFunction
Parameters:
x - x
Returns:
f(x)

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.