Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.math.optimization.fitting
Class HarmonicFunction

    java.lang.Object
      org.apache.commons.math.optimization.fitting.HarmonicFunction

All Implemented Interfaces:
  DifferentiableUnivariateRealFunction, UnivariateRealFunction

    public class HarmonicFunction

extends Object
implements DifferentiableUnivariateRealFunction

Harmonic function of the form `f (t) = a cos (ω t + φ)`.

Since:
  2.0
Version:
  $Revision: 990655 $ $Date: 2010-08-29 23:49:40 +0200 (dim. 29 aoÃ»t 2010) $

Constructor Summary
`HarmonicFunction(double a, double omega, double phi)` Simple constructor.

Method Summary
`HarmonicFunction` | `derivative()` Returns the derivative of the function
`double` | `getAmplitude()` Get the amplitude a.
`double` | `getPhase()` Get the phase φ.
`double` | `getPulsation()` Get the pulsation ω.
`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`

Constructor Detail

### HarmonicFunction

    public HarmonicFunction(double a,
                            double omega,
                            double phi)

  Simple constructor.

  Parameters:
    `a` - amplitude
    `omega` - pulsation
    `phi` - phase

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

### derivative

    public HarmonicFunction derivative()

  Returns the derivative of the function

  Specified by:
    `derivative` in interface `DifferentiableUnivariateRealFunction`
  Returns:
    the derivative function

### getAmplitude

    public double getAmplitude()

  Get the amplitude a.

  Returns:
    amplitude a;

### getPulsation

    public double getPulsation()

  Get the pulsation ω.

  Returns:
    pulsation ω

### getPhase

    public double getPhase()

  Get the phase φ.

  Returns:
    phase φ

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.