13 #ifndef eli_mutil_nls_newton_raphson_method_hpp
14 #define eli_mutil_nls_newton_raphson_method_hpp
16 #include "eli/code_eli.hpp"
26 template<
typename data__>
58 template<
typename f__,
typename g__>
59 int find_root(data_type &root,
const f__ &fun,
const g__ &fprime,
const data_type &f0)
const
61 data_type x(
x0), fx(fun(
x0)), fpx(fprime(
x0)), eval, eval_abs, dx(1);
66 eval_abs=std::abs(eval);
74 while (!this->
test_converged(count, eval_abs/f0, eval_abs) && (std::abs(dx)>0))
84 eval_abs=std::abs(eval);
bool max_iteration_reached(const iteration_type &it) const
Definition: iterative_root_base.hpp:261
Definition: newton_raphson_method.hpp:27
data_type x0
Definition: newton_raphson_method.hpp:102
newton_raphson_method(const newton_raphson_method< data_type > &nrm)
Definition: newton_raphson_method.hpp:39
~newton_raphson_method()
Definition: newton_raphson_method.hpp:44
bool test_converged(const iteration_type &it, const tolerance_type &relv, const tolerance_type &absv) const
Definition: iterative_root_base.hpp:256
newton_raphson_method()
Definition: newton_raphson_method.hpp:35
Definition: iterative_root_base.hpp:151
const data_type & get_initial_guess() const
Definition: newton_raphson_method.hpp:53
data__ data_type
Definition: newton_raphson_method.hpp:30
virtual data_type calculate_delta_factor(const data_type &, const data_type &dx) const
Definition: newton_raphson_method.hpp:99
static const int hit_constraint
Definition: newton_raphson_method.hpp:32
int find_root(data_type &root, const f__ &fun, const g__ &fprime, const data_type &f0) const
Definition: newton_raphson_method.hpp:59
static const int max_iteration
Definition: iterative_root_base.hpp:155
max_iteration_type::data_type iteration_type
Definition: iterative_root_base.hpp:161
static const int converged
Definition: iterative_root_base.hpp:154
void set_initial_guess(const data_type &xg)
Definition: newton_raphson_method.hpp:48