Options
All
  • Public
  • Public/Protected
  • All
Menu

Brent 1-D solver

test the correctness of the returned values is tested by checking them against known good results.

Hierarchy

Implements

Index

Properties

Protected _evaluationNumber

_evaluationNumber: Size

Protected _fxMax

_fxMax: Real

Protected _fxMin

_fxMin: Real

Protected _maxEvaluations

_maxEvaluations: Size = MAX_FUNCTION_EVALUATIONS

Protected _root

_root: Real

Protected _xMax

_xMax: Real

Protected _xMin

_xMin: Real

Methods

impl

  • impl(): any

lowerBound

  • lowerBound(): Real

lowerBoundEnforced

  • lowerBoundEnforced(): boolean

setLowerBound

  • setLowerBound(lowerBound: Real): void

setMaxEvaluations

  • setMaxEvaluations(evaluations: Size): void
  • This method sets the maximum number of function evaluations for the bracketing routine. An error is thrown if a bracket is not found after this number of evaluations.

    Parameters

    Returns void

setUpperBound

  • setUpperBound(upperBound: Real): void

Private sign

  • Parameters

    Returns Real

solve1

  • This method returns the zero of the function $ f $, determined with the given accuracy $ \epsilon $; depending on the particular solver, this might mean that the returned $ x $ is such that $ |f(x)| < \epsilon $ , or that $ |x-\xi| < \epsilon $ where $ \xi $ is the real zero.

    This method contains a bracketing routine to which an initial guess must be supplied as well as a step used to scan the range of the possible bracketing values.

    Parameters

    Returns Real

solve2

  • This method returns the zero of the function $ f $, determined with the given accuracy $ \epsilon $; depending on the particular solver, this might mean that the returned $ x $ is such that $ |f(x)| < \epsilon $ , or that $ |x-\xi| < \epsilon $ where $ \xi $ is the real zero.

    An initial guess must be supplied, as well as two values $ x_\mathrm{min} $ and $ x_\mathrm{max} $ which must bracket the zero (i.e., either $ f(x_\mathrm{min}) \leq 0 \leq f(x_\mathrm{max}) $, or $ f(x_\mathrm{max}) \leq 0 \leq f(x_\mathrm{min}) $ must be true).

    Parameters

    Returns Real

solveImpl

  • The implementation of the algorithm was inspired by Press, Teukolsky, Vetterling, and Flannery, "Numerical Recipes in C", 2nd edition, Cambridge University Press

    Parameters

    Returns Real

upperBound

  • upperBound(): Real

upperBoundEnforced

  • upperBoundEnforced(): boolean