Class HarmonicFunction
- java.lang.Object
-
- org.apache.commons.math.optimization.fitting.HarmonicFunction
-
- All Implemented Interfaces:
DifferentiableUnivariateRealFunction
,UnivariateRealFunction
public class HarmonicFunction extends java.lang.Object implements DifferentiableUnivariateRealFunction
Harmonic function of the formf (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
Constructors Constructor Description HarmonicFunction(double a, double omega, double phi)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HarmonicFunction
derivative()
Returns the derivative of the functiondouble
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.
-
-
-
Method Detail
-
value
public double value(double x)
Compute the value for the function.- Specified by:
value
in interfaceUnivariateRealFunction
- 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 interfaceDifferentiableUnivariateRealFunction
- 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 φ
-
-