Class SavitzkyGolayDerivativeEstimator

java.lang.Object
com.irurueta.numerical.DerivativeEstimator
com.irurueta.numerical.SavitzkyGolayDerivativeEstimator

public class SavitzkyGolayDerivativeEstimator extends DerivativeEstimator
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 Details

    • N_POINTS

      public static final int N_POINTS
      Number of required point to evaluate to compute derivative.
      See Also:
  • Constructor Details

    • SavitzkyGolayDerivativeEstimator

      public SavitzkyGolayDerivativeEstimator(SingleDimensionFunctionEvaluatorListener listener)
      Constructor.
      Parameters:
      listener - listener to evaluate a single dimension function.
  • Method Details

    • derivative

      public double derivative(double x) throws EvaluationException
      Computes the function derivative at provided point x.
      Overrides:
      derivative in class DerivativeEstimator
      Parameters:
      x - Point where derivative is estimated.
      Returns:
      Derivative of function at provided point.
      Throws:
      EvaluationException - Raised if function cannot be properly evaluated.