Class AbstractUnivariateDifferentiableSolver

java.lang.Object
org.hipparchus.analysis.solvers.BaseAbstractUnivariateSolver<UnivariateDifferentiableFunction>
org.hipparchus.analysis.solvers.AbstractUnivariateDifferentiableSolver
All Implemented Interfaces:
BaseUnivariateSolver<UnivariateDifferentiableFunction>, UnivariateDifferentiableSolver
Direct Known Subclasses:
NewtonRaphsonSolver

public abstract class AbstractUnivariateDifferentiableSolver extends BaseAbstractUnivariateSolver<UnivariateDifferentiableFunction> implements UnivariateDifferentiableSolver
Provide a default implementation for several functions useful to generic solvers.
  • Constructor Details Link icon

    • AbstractUnivariateDifferentiableSolver Link icon

      protected AbstractUnivariateDifferentiableSolver(double absoluteAccuracy)
      Construct a solver with given absolute accuracy.
      Parameters:
      absoluteAccuracy - Maximum absolute error.
    • AbstractUnivariateDifferentiableSolver Link icon

      protected AbstractUnivariateDifferentiableSolver(double relativeAccuracy, double absoluteAccuracy, double functionValueAccuracy)
      Construct a solver with given accuracies.
      Parameters:
      relativeAccuracy - Maximum relative error.
      absoluteAccuracy - Maximum absolute error.
      functionValueAccuracy - Maximum function value error.
  • Method Details Link icon

    • computeObjectiveValueAndDerivative Link icon

      protected DerivativeStructure computeObjectiveValueAndDerivative(double point) throws MathIllegalStateException
      Compute the objective function value.
      Parameters:
      point - Point at which the objective function must be evaluated.
      Returns:
      the objective function value and derivative at specified point.
      Throws:
      MathIllegalStateException - if the maximal number of evaluations is exceeded.
    • setup Link icon

      protected void setup(int maxEval, UnivariateDifferentiableFunction f, double min, double max, double startValue)
      Prepare for computation. Subclasses must call this method if they override any of the solve methods.
      Overrides:
      setup in class BaseAbstractUnivariateSolver<UnivariateDifferentiableFunction>
      Parameters:
      maxEval - Maximum number of evaluations.
      f - Function to solve.
      min - Lower bound for the interval.
      max - Upper bound for the interval.
      startValue - Start value to use.