## org.apache.commons.math.optimization.fitting
Class HarmonicFitter.ParametricHarmonicFunction

    java.lang.Object
      org.apache.commons.math.optimization.fitting.HarmonicFitter.ParametricHarmonicFunction

All Implemented Interfaces:
  ParametricRealFunction

Enclosing class:
  HarmonicFitter

    private static class HarmonicFitter.ParametricHarmonicFunction

extends java.lang.Object
implements ParametricRealFunction

Parametric harmonic function.

Constructor Summary
`private` `HarmonicFitter.ParametricHarmonicFunction()`

Method Summary
`double[]` `gradient(double x, double[] parameters)` Compute the gradient of the function with respect to its parameters.
`double` `value(double x, double[] parameters)` Compute the value of the function.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HarmonicFitter.ParametricHarmonicFunction

    private HarmonicFitter.ParametricHarmonicFunction()

Method Detail

### value

    public double value(double x,
                        double[] parameters)

  Compute the value of the function.

  Specified by:
    `value` in interface `ParametricRealFunction`
  Parameters:
    `x` - the point for which the function value should be computed
    `parameters` - function parameters
  Returns:
    the value

### gradient

    public double[] gradient(double x,
                             double[] parameters)

  Compute the gradient of the function with respect to its parameters.

  Specified by:
    `gradient` in interface `ParametricRealFunction`
  Parameters:
    `x` - the point for which the function value should be computed
    `parameters` - function parameters
  Returns:
    the value

Copyright (c) 2003-2011 Apache Software Foundation