public class HarmonicOscillator extends java.lang.Object implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction
| Modifier and Type | Class and Description |
|---|---|
static class |
HarmonicOscillator.Parametric
Parametric function where the input array contains the parameters of
the harmonic oscillator function, ordered as follows:
Amplitude
Angular frequency
Phase
|
| Modifier and Type | Field and Description |
|---|---|
private double |
amplitude
Amplitude.
|
private double |
omega
Angular frequency.
|
private double |
phase
Phase.
|
| Constructor and Description |
|---|
HarmonicOscillator(double amplitude,
double omega,
double phase)
Harmonic oscillator function.
|
| Modifier and Type | Method and Description |
|---|---|
UnivariateFunction |
derivative()
Deprecated.
as of 3.1, replaced by
value(DerivativeStructure) |
DerivativeStructure |
value(DerivativeStructure t)
Simple mathematical function.
|
double |
value(double x)
Compute the value of the function.
|
private static double |
value(double xTimesOmegaPlusPhase,
double amplitude) |
private final double amplitude
private final double omega
private final double phase
public HarmonicOscillator(double amplitude,
double omega,
double phase)
amplitude - Amplitude.omega - Angular frequency.phase - Phase.public double value(double x)
value in interface UnivariateFunctionx - Point at which the function value should be computed.@Deprecated public UnivariateFunction derivative()
value(DerivativeStructure)derivative in interface DifferentiableUnivariateFunctionprivate static double value(double xTimesOmegaPlusPhase,
double amplitude)
xTimesOmegaPlusPhase - omega * x + phase.amplitude - Amplitude.x.public DerivativeStructure value(DerivativeStructure t) throws DimensionMismatchException
UnivariateDifferentiableFunction classes compute both the
value and the first derivative of the function.
value in interface UnivariateDifferentiableFunctiont - function input valueDimensionMismatchException - if t is inconsistent with the
function's free parameters or orderCopyright (c) 2003-2015 Apache Software Foundation