Documentation of 'org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver' Java class
BaseAbstractUnivariateSolver
org.apache.commons.math3.analysis.solvers

Class BaseAbstractUnivariateSolver<FUNC extends UnivariateFunction>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double getAbsoluteAccuracy()
      Get the absolute accuracy of the solver.
      int getEvaluations()
      Get the number of evaluations of the objective function.
      double getFunctionValueAccuracy()
      Get the function value accuracy of the solver.
      double getMax() 
      int getMaxEvaluations()
      Get the maximum number of function evaluations.
      double getMin() 
      double getRelativeAccuracy()
      Get the relative accuracy of the solver.
      double getStartValue() 
      double solve(int maxEval, FUNC f, double startValue)
      Solve for a zero in the vicinity of startValue.
      double solve(int maxEval, FUNC f, double min, double max)
      Solve for a zero root in the given interval.
      double solve(int maxEval, FUNC f, double min, double max, double startValue)
      Solve for a zero in the given interval, start at startValue.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getEvaluations

        public int getEvaluations()
        Get the number of evaluations of the objective function. The number of evaluations corresponds to the last call to the optimize method. It is 0 if the method has not been called yet.
        Specified by:
        getEvaluations in interface BaseUnivariateSolver<FUNC extends UnivariateFunction>
        Returns:
        the number of evaluations of the objective function.
      • getMin

        public double getMin()
        Returns:
        the lower end of the search interval.
      • getMax

        public double getMax()
        Returns:
        the higher end of the search interval.
      • getStartValue

        public double getStartValue()
        Returns:
        the initial guess.
      • getAbsoluteAccuracy

        public double getAbsoluteAccuracy()
        Get the absolute accuracy of the solver. Solutions returned by the solver should be accurate to this tolerance, i.e., if ε is the absolute accuracy of the solver and v is a value returned by one of the solve methods, then a root of the function should exist somewhere in the interval (v - ε, v + ε).
        Specified by:
        getAbsoluteAccuracy in interface BaseUnivariateSolver<FUNC extends UnivariateFunction>
        Returns:
        the absolute accuracy.
      • getRelativeAccuracy

        public double getRelativeAccuracy()
        Get the relative accuracy of the solver. The contract for relative accuracy is the same as BaseUnivariateSolver.getAbsoluteAccuracy(), but using relative, rather than absolute error. If ρ is the relative accuracy configured for a solver and v is a value returned, then a root of the function should exist somewhere in the interval (v - ρ v, v + ρ v).
        Specified by:
        getRelativeAccuracy in interface BaseUnivariateSolver<FUNC extends UnivariateFunction>
        Returns:
        the relative accuracy.
      • getFunctionValueAccuracy

        public double getFunctionValueAccuracy()
        Get the function value accuracy of the solver. If v is a value returned by the solver for a function f, then by contract, |f(v)| should be less than or equal to the function value accuracy configured for the solver.
        Specified by:
        getFunctionValueAccuracy in interface BaseUnivariateSolver<FUNC extends UnivariateFunction>
        Returns:
        the function value accuracy.
      • solve

        public double solve(int maxEval,
                            FUNC f,
                            double min,
                            double max,
                            double startValue)
                     throws TooManyEvaluationsException,
                            NoBracketingException
        Solve for a zero in the given interval, start at startValue. A solver may require that the interval brackets a single zero root. Solvers that do require bracketing should be able to handle the case where one of the endpoints is itself a root.
        Specified by:
        solve in interface BaseUnivariateSolver<FUNC extends UnivariateFunction>
        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.
        Returns:
        a value where the function is zero.
        Throws:
        TooManyEvaluationsException - if the allowed number of evaluations is exceeded.
        NoBracketingException
      • solve

        public double solve(int maxEval,
                            FUNC f,
                            double min,
                            double max)
        Solve for a zero root in the given interval. A solver may require that the interval brackets a single zero root. Solvers that do require bracketing should be able to handle the case where one of the endpoints is itself a root.
        Specified by:
        solve in interface BaseUnivariateSolver<FUNC extends UnivariateFunction>
        Parameters:
        maxEval - Maximum number of evaluations.
        f - Function to solve.
        min - Lower bound for the interval.
        max - Upper bound for the interval.
        Returns:
        a value where the function is zero.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.