3 #ifndef MYGSL_ONE_DIMENSIONAL_ROOT_FINDING_H 4 #define MYGSL_ONE_DIMENSIONAL_ROOT_FINDING_H 1 9 #include <gsl/gsl_roots.h> 45 virtual void action (
int status_,
60 virtual void action (
int status_,
105 int solve (
double epsabs_,
double a_,
double b_);
107 static double g_function (
double x_,
void * params_);
109 static double g_dfunction (
double x_,
void * params_);
111 static void g_fdfunction (
double x_,
void * params_,
double * y_,
double * dy_);
140 const gsl_root_fsolver_type * _fsolver_type_;
141 const gsl_root_fdfsolver_type * _fdfsolver_type_;
142 gsl_root_fsolver * _fsolver_;
143 gsl_root_fdfsolver * _fdfsolver_;
154 gsl_function _function_;
155 gsl_function_fdf _fdfunction_;
164 #endif // MYGSL_ONE_DIMENSIONAL_ROOT_FINDING_H static void g_fdfunction(double x_, void *params_, double *y_, double *dy_)
void set_step_action(at_step_action &action_)
bool is_fdfsolver() const
static const std::string STEFFENSON_METHOD_LABEL
Definition: one_dimensional_root_finding.h:29
static const std::string BRENT_METHOD_LABEL
Definition: one_dimensional_root_finding.h:25
int solve(double epsabs_, double a_, double b_)
Definition: one_dimensional_root_finding.h:36
virtual void action(int status_, size_t iter_, double a_, double b_, double c_)=0
Definition: one_dimensional_root_finding.h:37
static const std::string NEWTON_METHOD_LABEL
Definition: one_dimensional_root_finding.h:27
A data structure representing a numeric value and its associated error.
Definition: best_value.h:17
static const double DEFAULT_EPSABS
Definition: one_dimensional_root_finding.h:31
static const std::string BISECTION_METHOD_LABEL
Definition: one_dimensional_root_finding.h:23
bool is_converged() const
Abstract interface for unary functions with derivative.
Definition: i_unary_function_with_derivative.h:28
virtual void action(int status_, size_t iter_, double a_, double b_, double c_)
virtual ~one_dimensional_root_solver()
void set_default_step_action()
std::string get_name() const
static double g_function(double x_, void *params_)
static const std::string FALSEPOS_METHOD_LABEL
Definition: one_dimensional_root_finding.h:24
static const size_t DEFAULT_MAX_ITER
Definition: one_dimensional_root_finding.h:30
bool is_initialized() const
One dimensional root solver algorithm.
Definition: one_dimensional_root_finding.h:19
Definition: one_dimensional_root_finding.h:40
static const std::string SECANT_METHOD_LABEL
Definition: one_dimensional_root_finding.h:28
double get_epsabs() const
const best_value & get_root() const
one_dimensional_root_solver(bool debug_=false)
Definition: one_dimensional_root_finding.h:58
void init(const i_unary_function &sys_, const std::string &method_=BRENT_METHOD_LABEL)
Abstract interface for unary functions : R -> R.
Definition: i_unary_function.h:44
static double g_dfunction(double x_, void *params_)
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
Definition: one_dimensional_root_finding.h:35
size_t get_max_iter() const
mode_t
Definition: one_dimensional_root_finding.h:33
void operator()(int status_, size_t iter_, double a_, double b_, double c_)
void set_debug(bool debug_=true)
void _at_step_hook(int status_, size_t iter_, double a_, double b_, double c_)