org.apache.commons.math.optimization.fitting

## 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
  Version:
    $Revision: 1037327 $ $Date: 2010-11-20 21:57:37 +0100 (sam. 20 nov. 2010) $
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private double` | `b` Parameter b of this function.
    `private double` | `c` Parameter c of this function.
    `private double` | `d2` Square of the parameter d of this function.
    `private static long` | `serialVersionUID` Serializable version identifier.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GaussianDerivativeFunction(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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `value(double x)` Compute the value for the function.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      Serializable version identifier.
      See Also:
        Constant Field Values

    - #### b

          private final double b

      Parameter b of this function.

    - #### c

          private final double c

      Parameter c of this function.

    - #### d2

          private final double d2

      Square of the parameter d of this function.

  - ### Constructor Detail

    - #### GaussianDerivativeFunction

          public GaussianDerivativeFunction(double b,
                                    double c,
                                    double d)

      Constructs an instance with the specified parameters.
      Parameters:
        `b` - `b` parameter value
        `c` - `c` parameter value
        `d` - `d` parameter value
      Throws:
        `IllegalArgumentException` - if `d` is 0

    - #### GaussianDerivativeFunction

          public GaussianDerivativeFunction(double[] parameters)

      Constructs an instance with the specified parameters.
      Parameters:
        `parameters` - `b`, `c`, and `d` parameter values
      Throws:
        `IllegalArgumentException` - if `parameters` is null, `parameters` length is not 3, or if `parameters[2]` is 0

  - ### Method Detail

    - #### value

          public double value(double x)

      Compute the value for the function.
      Specified by:
        `value` in interface `UnivariateRealFunction`
      Parameters:
        `x` - the point for which the function value should be computed
      Returns:
        the value

Copyright (c) 2003-2013 Apache Software Foundation