#include <gsl_root_brent.h>
This class finds the root of a user-specified function. If test_form is 0, then solve_bkt() stops when the size of the bracket is smaller than root::tolx. If test_form is 1, then the function stops when the residual is less than root::tolf. If test_form is 2, then both tests are applied.
x_lower
, x_upper
, a
, and b
, which could be removed.Definition at line 54 of file gsl_root_brent.h.
Public Member Functions | |
gsl_root_brent () | |
virtual const char * | type () |
Return the type, "gsl_root_brent" . | |
int | iterate (func_t &f) |
Perform an iteration. | |
virtual int | solve_bkt (double &x1, double x2, param_t &pa, func_t &f) |
Solve func in region ![]() ![]() | |
double | get_root () |
Get the most recent value of the root. | |
double | get_lower () |
Get the lower limit. | |
double | get_upper () |
Get the upper limit. | |
int | set (func_t &ff, double lower, double upper, param_t &pa) |
Set the information for the solver. | |
Data Fields | |
int | test_form |
The type of convergence test applied: 0, 1, or 2 (default 0). | |
Protected Attributes | |
double | root |
The present solution estimate. | |
double | x_lower |
The present lower limit. | |
double | x_upper |
The present upper limit. | |
param_t * | params |
The function parameters. | |
Storage for solver state | |
double | a |
double | b |
double | c |
double | d |
double | e |
double | fa |
double | fb |
double | fc |
int iterate | ( | func_t & | f | ) | [inline] |
Perform an iteration.
This function always returns gsl_success.
Definition at line 74 of file gsl_root_brent.h.
virtual int solve_bkt | ( | double & | x1, | |
double | x2, | |||
param_t & | pa, | |||
func_t & | f | |||
) | [inline, virtual] |
Solve func
in region returning
.
Test the bracket size
Test the residual
Test the bracket size and the residual
Reimplemented from root.
Definition at line 186 of file gsl_root_brent.h.
int set | ( | func_t & | ff, | |
double | lower, | |||
double | upper, | |||
param_t & | pa | |||
) | [inline] |
Set the information for the solver.
This function always returns gsl_success.
Definition at line 298 of file gsl_root_brent.h.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page