public class HarmonicFitter extends CurveFitter<HarmonicOscillator.Parametric>
f (t) = a cos (ω t + φ)
. They are
searched by a least square estimator initialized with a rough guess
based on integrals.Modifier and Type | Class and Description |
---|---|
static class |
HarmonicFitter.ParameterGuesser
This class guesses harmonic coefficients from a sample.
|
Constructor and Description |
---|
HarmonicFitter(MultivariateVectorOptimizer optimizer)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
double[] |
fit()
Fit an harmonic function to the observed points.
|
double[] |
fit(double[] initialGuess)
Fit an harmonic function to the observed points.
|
addObservedPoint, addObservedPoint, addObservedPoint, clearObservations, fit, fit, getObservations
public HarmonicFitter(MultivariateVectorOptimizer optimizer)
optimizer
- Optimizer to use for the fitting.public double[] fit(double[] initialGuess)
initialGuess
- First guess values in the following order:
public double[] fit()
fit
method.NumberIsTooSmallException
- if the sample is too short for the
the first guess to be computed.ZeroException
- if the first guess cannot be computed because
the abscissa range is zero.Copyright © 2019 CNES. All rights reserved.