Class root_bkt (o2scl)¶
-
template<class
func_t
= funct, classdfunc_t
= func_t, classfp_t
= double>
classo2scl
::
root_bkt
: public o2scl::root<funct, funct, double>¶ One-dimensional bracketing solver [abstract base].
Public Functions
-
root_bkt
()¶
-
~root_bkt
()¶
-
const char *
type
()¶ Return the type,
"root_bkt"
.
-
int
solve_bkt
(fp_t &x1, fp_t x2, func_t &func) = 0¶ Solve
func
in region \( x_1<x<x_2 \)returning
\( x_1 \) .
-
int
solve
(fp_t &x, func_t &func)¶ Solve
func
usingx
as an initial guess.This has been updated to automatically bracket functions which are undefined away from the initial guess, but there are still various ways in which the bracketing algorithm can fail.
- Idea for Future:
Return early if the bracketing procedure finds a root early?
-