public class ParametricGaussianFunction extends java.lang.Object implements ParametricRealFunction, java.io.Serializable
f(x) = a + b*exp(-((x - c)^2 / (2*d^2)))
The parameters have the following meaning:
Constructor and Description |
---|
ParametricGaussianFunction()
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
double[] |
gradient(double x,
double[] parameters)
Computes the gradient vector for a four variable version of the function
where the parameters, a, b, c, and d,
are considered the variables, not x.
|
double |
value(double x,
double[] parameters)
Computes value of function f(x) for the specified x and
parameters a, b, c, and d.
|
public ParametricGaussianFunction()
public double value(double x, double[] parameters) throws ZeroException
value
in interface ParametricRealFunction
x
- x valueparameters
- values of a, b, c, and
djava.lang.IllegalArgumentException
- if parameters
is invalid as
determined by validateParameters(double[])
ZeroException
- if parameters
values are
invalid as determined by validateParameters(double[])
public double[] gradient(double x, double[] parameters) throws ZeroException
The components of the computed gradient vector are the partial derivatives of f(a, b, c, d) with respect to each variable. That is, the partial derivative of f(a, b, c, d) with respect to a, the partial derivative of f(a, b, c, d) with respect to b, the partial derivative of f(a, b, c, d) with respect to c, and the partial derivative of f(a, b, c, d) with respect to d.
gradient
in interface ParametricRealFunction
x
- x value to be used as constant in f(a, b, c,
d)parameters
- values of a, b, c, and
d for computation of gradient vector of f(a, b, c,
d)java.lang.IllegalArgumentException
- if parameters
is invalid as
determined by validateParameters(double[])
ZeroException
- if parameters
values are
invalid as determined by validateParameters(double[])
Copyright © 2010 - 2020 Adobe. All Rights Reserved