stator
A math, geometry, and utility library
Namespaces | Functions
numeric.hpp File Reference
#include <stator/symbolic/precision.hpp>
#include <array>

Go to the source code of this file.

Namespaces

 stator
 The stator library namespace.
 
 stator::numeric
 Numerical routines, such as root-finding, etc.
 
 stator::numeric::detail
 

Functions

template<class F , class Real >
bool stator::numeric::bisection (const F &f, Real &x, Real low_bound, Real high_bound, size_t iterations=0, int digits=std::numeric_limits< Real >::digits/2)
 
template<class F , size_t Derivatives, class Real >
int stator::numeric::bisection_step (const F &f, std::array< Real, Derivatives > &curr_state, Real &x, Real &low_bound, Real &high_bound, Real x_precision)
 A single bisection step. More...
 
template<class F , size_t Derivatives, class Real >
int stator::numeric::halley_step (const F &f, std::array< Real, Derivatives > &curr_state, Real &x, Real &low_bound, Real &high_bound, Real x_precision)
 A single step of Halley's method for finding roots. More...
 
template<class F , class Real >
bool stator::numeric::halleys_method (const F &f, Real &x, Real low_bound=-HUGE_VAL, Real high_bound=+HUGE_VAL, size_t iterations=0, int digits=std::numeric_limits< Real >::digits/2)
 Safeguarded Halley's method for detecting a root. More...
 
template<class F , class Real >
bool stator::numeric::newton_raphson (const F &f, Real &x, Real low_bound=-HUGE_VAL, Real high_bound=+HUGE_VAL, size_t iterations=0, int digits=std::numeric_limits< Real >::digits/2)
 Safeguarded newton_raphson method for detecting a root. More...
 
template<class F , size_t Derivatives, class Real >
int stator::numeric::newton_raphson_step (const F &f, std::array< Real, Derivatives > &curr_state, Real &x, Real &low_bound, Real &high_bound, Real x_precision)
 A single step of the Newton-Raphson method for finding roots. More...
 
template<class F , size_t Derivatives, class Real >
int stator::numeric::detail::process_iterative_step (const F &f, std::array< Real, Derivatives > &curr_state, Real &x, Real new_x, Real &low_bound, Real &high_bound, Real x_precision)
 Update and checking of safeguards, called after an iterative step is taken towards a root. More...
 
template<class F , size_t Derivatives, class Real >
int stator::numeric::schroeder_step (const F &f, std::array< Real, Derivatives > &curr_state, Real &x, Real &low_bound, Real &high_bound, Real x_precision)
 A single step of Schroeder's method for finding roots. More...