Class GaussianDerivativeFunction
java.lang.Object
org.apache.commons.math.optimization.fitting.GaussianDerivativeFunction
- All Implemented Interfaces:
Serializable,UnivariateRealFunction
public class GaussianDerivativeFunction
extends Object
implements UnivariateRealFunction, Serializable
The derivative of
GaussianFunction. Specifically:
f'(x) = (-b / (d^2)) * (x - c) * exp(-((x - c)^2) / (2*(d^2)))
Notation key:
- x^n: x raised to the power of n
- exp(x): e^x
- Since:
- 2.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGaussianDerivativeFunction(double[] parameters) Constructs an instance with the specified parameters.GaussianDerivativeFunction(double b, double c, double d) Constructs an instance with the specified parameters. -
Method Summary
-
Constructor Details
-
GaussianDerivativeFunction
public GaussianDerivativeFunction(double b, double c, double d) Constructs an instance with the specified parameters.- Parameters:
b- b parameter valuec- c parameter valued- d parameter value- Throws:
IllegalArgumentException- ifdis 0
-
GaussianDerivativeFunction
public GaussianDerivativeFunction(double[] parameters) Constructs an instance with the specified parameters.- Parameters:
parameters- b, c, and d parameter values- Throws:
IllegalArgumentException- ifparametersis null,parameterslength is not 3, or ifparameters[2]is 0
-
-
Method Details
-
value
public double value(double x) Compute the value for the function.- Specified by:
valuein interfaceUnivariateRealFunction- Parameters:
x- the point for which the function value should be computed- Returns:
- the value
-