Theoretica
A C++ numerical and automatic mathematical library
|
Root approximation of real functions. More...
#include "../core/function.h"
#include "../calculus/deriv.h"
#include "../autodiff/dual.h"
#include "../autodiff/dual2.h"
#include "../algebra/vec.h"
#include "../complex/complex.h"
Go to the source code of this file.
Namespaces | |
theoretica | |
Main namespace of the library which contains all functions and objects. | |
Functions | |
template<typename RealFunction > | |
std::vector< vec2 > | theoretica::find_root_intervals (RealFunction f, real a, real b, unsigned int steps=10) |
Find candidate intervals for root finding. More... | |
template<typename RealFunction > | |
real | theoretica::root_bisection (RealFunction f, real a, real b, real tolerance=OPTIMIZATION_TOL) |
Approximate a root of an arbitrary function using bisection inside a compact interval [a, b] where f(a) * f(b) < 0. More... | |
template<typename RealFunction > | |
real | theoretica::root_newton (RealFunction f, RealFunction Df, real guess=0) |
Approximate a root of an arbitrary function using Newton's method. More... | |
real | theoretica::root_newton (dual(*f)(dual), real guess=0) |
Approximate a root of an arbitrary function using Newton's method, computing the derivative using automatic differentiation. More... | |
real | theoretica::root_newton (const polynomial< real > &p, real guess=0) |
Approximate a root of a polynomial using Newton's method. More... | |
complex | theoretica::root_newton (complex<>(*f)(complex<>), complex<>(*df)(complex<>), complex<> guess=complex<>(0, 0), real tolerance=OPTIMIZATION_TOL, unsigned int max_iter=OPTIMIZATION_TOL) |
Approximate a root of an arbitrary complex function using Newton's method,. More... | |
template<typename RealFunction > | |
real | theoretica::root_halley (RealFunction f, RealFunction Df, RealFunction D2f, real guess=0) |
Approximate a root of an arbitrary function using Halley's method. More... | |
real | theoretica::root_halley (dual2(*f)(dual2), real guess=0) |
Approximate a root of an arbitrary function using Halley's method, leveraging automatic differentiation to compute the first and second derivatives of the function. More... | |
real | theoretica::root_halley (const polynomial< real > &p, real guess=0) |
Approximate a root of a polynomial using Halley's method. More... | |
template<typename RealFunction > | |
real | theoretica::root_steffensen (RealFunction f, real guess=0) |
Approximate a root of an arbitrary function using Steffensen's method. More... | |
real | theoretica::root_steffensen (const polynomial< real > &p, real guess=0) |
Approximate a root of a polynomial using Steffensen's method. More... | |
template<typename RealFunction > | |
real | theoretica::root_chebyshev (RealFunction f, RealFunction Df, RealFunction D2f, real guess=0) |
Approximate a root of an arbitrary function using Chebyshev's method. More... | |
real | theoretica::root_chebyshev (dual2(*f)(dual2), real guess=0) |
Approximate a root of an arbitrary function using Chebyshev's method, by computing the first and second derivatives using automatic differentiation. More... | |
real | theoretica::root_chebyshev (const polynomial< real > &p, real guess=0) |
Approximate a root of a polynomial using Chebyshev's method. More... | |
template<typename RealFunction > | |
std::vector< real > | theoretica::roots (RealFunction f, real a, real b, real tolerance=OPTIMIZATION_TOL, real steps=10) |
Find the roots of a function inside a given interval. More... | |
template<typename Field > | |
std::vector< Field > | theoretica::roots (const polynomial< Field > &p, real tolerance=OPTIMIZATION_TOL, unsigned int steps=0) |
Find all the roots of a polynomial. More... | |
Root approximation of real functions.