SSJ  3.3.1
Stochastic Simulation in Java
Static Public Member Functions | List of all members
RootFinder Class Reference

This class provides methods to solve non-linear equations. More...

Static Public Member Functions

static double brentDekker (double a, double b, MathFunction f, double tol)
 Computes a root \(x\) of the function in f using the Brent-Dekker method. More...
 
static double bisection (double a, double b, MathFunction f, double tol)
 Computes a root \(x\) of the function in f using the bisection method. More...
 

Detailed Description

This class provides methods to solve non-linear equations.

Member Function Documentation

◆ bisection()

static double bisection ( double  a,
double  b,
MathFunction  f,
double  tol 
)
static

Computes a root \(x\) of the function in f using the bisection method.

The interval \([a, b]\) must contain the root \(x\). The calculations are done with an approximate relative precision tol. Returns \(x\) such that \(f(x) = 0\).

Parameters
aleft endpoint of initial interval
bright endpoint of initial interval
fthe function which is evaluated
tolaccuracy goal
Returns
the root \(x\)

◆ brentDekker()

static double brentDekker ( double  a,
double  b,
MathFunction  f,
double  tol 
)
static

Computes a root \(x\) of the function in f using the Brent-Dekker method.

The interval \([a, b]\) must contain the root \(x\). The calculations are done with an approximate relative precision tol. Returns \(x\) such that \(f(x) = 0\).

Parameters
aleft endpoint of initial interval
bright endpoint of initial interval
fthe function which is evaluated
tolaccuracy goal
Returns
the root \(x\)

The documentation for this class was generated from the following file: