Class root (o2scl)¶
-
template<class func_t = funct, class dfunc_t = func_t, class fp_t = double>
class root¶ One-dimensional solver [abstract base].
See the One-dimensional solvers section of the User’s guide for general information about O2scl solvers.
class root
Future:
Maybe consider allowing the user to specify
the stream to which ‘verbose’ information is sent.
Subclassed by o2scl::root_bkt< std::function< double(double)>, std::function< double(double)>, double >, o2scl::root_bkt< funct, funct, double >, o2scl::root_bkt< std::function< cpp_dec_float_25(cpp_dec_float_25)>, std::function< cpp_dec_float_25(cpp_dec_float_25)>, cpp_dec_float_25 >, o2scl::root_bkt< funct_cdf25, funct_cdf25, cpp_dec_float_25 >, o2scl::root_bkt< std::function< long double(long double)>, std::function< long double(long double)>, long double >, o2scl::root_bkt< funct_ld, funct_ld, long double >, o2scl::root_bkt< funct >, o2scl::root_bkt< std::function< cpp_dec_float_35(cpp_dec_float_35)>, std::function< cpp_dec_float_35(cpp_dec_float_35)>, cpp_dec_float_35 >, o2scl::root_bkt< std::function< cpp_dec_float_50(cpp_dec_float_50)>, std::function< cpp_dec_float_50(cpp_dec_float_50)>, cpp_dec_float_50 >, o2scl::root_bkt< std::function< cpp_dec_float_100(cpp_dec_float_100)>, std::function< cpp_dec_float_100(cpp_dec_float_100)>, cpp_dec_float_100 >, o2scl::root_bkt< o2scl::nstar_rot::polytrope_solve >, o2scl::root_cern< funct_cdf25, cpp_dec_float_25 >, o2scl::root_cern< funct_ld, long double >, o2scl::root_cern< funct, double >, o2scl::root_de< funct, funct >, o2scl::root_bkt< func_t, dfunc_t, fp_t >, o2scl::root_cern< func_t, fp_t >, o2scl::root_de< func_t, dfunc_t, fp_t >, o2scl::root_robbins_monro< func_t, dfunc_t >
Public Functions
-
inline root()¶
-
inline virtual ~root()¶
-
inline virtual const char *type()¶
Return the type,
"root"
.
-
template<class fp2_t>
inline int print_iter(fp2_t x, fp2_t y, int iter, fp2_t value = 0.0, fp2_t limit = 0.0, std::string comment = "")¶ Print out iteration information.
Depending on the value of the variable verbose, this prints out the iteration information. If verbose=0, then no information is printed, while if verbose>1, then after each iteration, the present values of
x
andy
are output to std::cout along with the iteration number. If verbose>=2 then each iteration waits for a character before continuing.