public class GaussianFunction extends java.lang.Object implements DifferentiableUnivariateRealFunction, java.io.Serializable
f(x) = a + b*exp(-((x - c)^2 / (2*d^2)))
Notation key:
GaussianDerivativeFunction
,
ParametricGaussianFunction
,
Serialized FormConstructor and Description |
---|
GaussianFunction(double[] parameters)
Constructs an instance with the specified parameters.
|
GaussianFunction(double a,
double b,
double c,
double d)
Constructs an instance with the specified parameters.
|
Modifier and Type | Method and Description |
---|---|
UnivariateRealFunction |
derivative()
Returns the derivative of the function
|
double |
getA()
Gets a parameter value.
|
double |
getB()
Gets b parameter value.
|
double |
getC()
Gets c parameter value.
|
double |
getD()
Gets d parameter value.
|
double |
value(double x)
Compute the value for the function.
|
public GaussianFunction(double a, double b, double c, double d)
a
- a parameter valueb
- b parameter valuec
- c parameter valued
- d parameter valuejava.lang.IllegalArgumentException
- if d
is 0public GaussianFunction(double[] parameters)
parameters
- a, b, c, and d
parameter valuesjava.lang.IllegalArgumentException
- if parameters
is null,
parameters
length is not 4, or if
parameters[3]
is 0public UnivariateRealFunction derivative()
derivative
in interface DifferentiableUnivariateRealFunction
public double value(double x)
value
in interface UnivariateRealFunction
x
- the point for which the function value should be computedpublic double getA()
public double getB()
public double getC()
public double getD()
Copyright © 2010 - 2020 Adobe. All Rights Reserved