Class root_brent_gsl (o2scl)¶
-
template<class
func_t
= funct, classfp_t
= double>
classo2scl
::
root_brent_gsl
: public o2scl::root_bkt<funct, funct, double>¶ One-dimensional root-finding (GSL)
This class finds the root of a user-specified function. If test_form is 0 (the default), then solve_bkt() stops when the size of the bracket is smaller than root::tol_abs. If test_form is 1, then the function stops when the residual is less than root::tol_rel. If test_form is 2, then both tests are applied.
See the onedsolve_subsect section of the User’s guide for general information about solvers. An example demonstrating the usage of this class is given in
examples/ex_fptr.cpp
and the ex_fptr_sect .- Idea for Future:
There is some duplication in the variables
x_lower
,x_upper
,a
, andb
, which could be removed. Some better variable names would also be helpful.
- Idea for Future:
Create a meaningful enum list for o2scl::root_brent_gsl::test_form.
Public Functions
-
root_brent_gsl
()¶
-
const char *
type
()¶ Return the type,
"root_brent_gsl"
.
Public Members
-
int
test_form
¶ The type of convergence test applied: 0, 1, or 2 (default 0)
Protected Functions