Package com.irurueta.numerical
Class SavitzkyGolayDerivativeEstimator
java.lang.Object
com.irurueta.numerical.DerivativeEstimator
com.irurueta.numerical.SavitzkyGolayDerivativeEstimator
Class to estimate the derivative of a single dimension function at a given
point.
The algorithm used in this implementation is valid for continuous functions
only, otherwise inaccurate results might be obtained.
This implementation is more robust against small discontinuities than
SymmetricDerivativeEstimator, but it is also slower to compute.
This method interpolates the sampled function values into a polynomial of
2nd degree (parabolic), whose derivative is known.
Because a linear system of equations has to be solved to determine such
polynomial, this method might be less accurate when large values are involved
due to limited machine precision.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Number of required point to evaluate to compute derivative.Fields inherited from class com.irurueta.numerical.DerivativeEstimator
EPS, listener
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
derivative
(double x) Computes the function derivative at provided point x.
-
Field Details
-
N_POINTS
public static final int N_POINTSNumber of required point to evaluate to compute derivative.- See Also:
-
-
Constructor Details
-
SavitzkyGolayDerivativeEstimator
Constructor.- Parameters:
listener
- listener to evaluate a single dimension function.
-
-
Method Details
-
derivative
Computes the function derivative at provided point x.- Overrides:
derivative
in classDerivativeEstimator
- Parameters:
x
- Point where derivative is estimated.- Returns:
- Derivative of function at provided point.
- Throws:
EvaluationException
- Raised if function cannot be properly evaluated.
-