| 
    Theoretica
    
   Mathematical Library 
   | 
 
Integral approximation. More...
#include "../core/constants.h"#include "../core/function.h"#include "../polynomial/polynomial.h"#include "../polynomial/orthogonal.h"#include "./gauss.h"Go to the source code of this file.
Namespaces | |
| namespace | theoretica | 
| Main namespace of the library which contains all functions and objects.  | |
Functions | |
| template<typename Field = real> | |
| polynomial< Field > | theoretica::integral (const polynomial< Field > &p) | 
| Compute the indefinite integral of a polynomial.   | |
| real | theoretica::integral (const polynomial< real > &p, real a, real b) | 
| Compute the definite integral of a polynomial over an interval.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_midpoint (RealFunction f, real a, real b, unsigned int steps=CALCULUS_INTEGRAL_STEPS) | 
| Approximate the definite integral of an arbitrary function using the midpoint method.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_trapezoid (RealFunction f, real a, real b, unsigned int steps=CALCULUS_INTEGRAL_STEPS) | 
| Approximate the definite integral of an arbitrary function using the trapezoid method.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_simpson (RealFunction f, real a, real b, unsigned int steps=CALCULUS_INTEGRAL_STEPS) | 
| Approximate the definite integral of an arbitrary function using Simpson's method.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_romberg (RealFunction f, real a, real b, unsigned int iter=8) | 
| Approximate the definite integral of an arbitrary function using Romberg's method accurate to the given order.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_romberg_tol (RealFunction f, real a, real b, real tolerance=CALCULUS_INTEGRAL_TOL) | 
| Approximate the definite integral of an arbitrary function using Romberg's method to the given tolerance.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_gauss (RealFunction f, const std::vector< real > &x, const std::vector< real > &w) | 
| Use Gaussian quadrature using the given points and weights.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_gauss (RealFunction f, real *x, real *w, unsigned int n) | 
| Use Gaussian quadrature using the given points and weights.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_gauss (RealFunction f, real *x, real *w, unsigned int n, real_function Winv) | 
| Use Gaussian quadrature using the given points and weights.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_legendre (RealFunction f, real a, real b, real *x, real *w, unsigned int n) | 
| Use Gauss-Legendre quadrature of arbitrary degree to approximate a definite integral providing the roots of the n degree Legendre polynomial.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_legendre (RealFunction f, real a, real b, const std::vector< real > &x, const std::vector< real > &w) | 
| Use Gauss-Legendre quadrature of arbitrary degree to approximate a definite integral providing the roots of the n degree Legendre polynomial.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_legendre (RealFunction f, real a, real b, const std::vector< real > &x) | 
| Use Gauss-Legendre quadrature of arbitrary degree to approximate a definite integral providing the roots of the n degree Legendre polynomial.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_legendre (RealFunction f, real a, real b, unsigned int n=16) | 
| Use Gauss-Legendre quadrature of degree 2, 4, 8 or 16, using pre-computed values, to approximate an integral over [a, b].   | |
| template<typename RealFunction > | |
| real | theoretica::integral_laguerre (RealFunction f, const std::vector< real > &x) | 
| Use Gauss-Laguerre quadrature of arbitrary degree to approximate an integral over [0, +inf) providing the roots of the n degree Legendre polynomial.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_laguerre (RealFunction f, real a, real b, const std::vector< real > &x) | 
| Use Gauss-Laguerre quadrature of arbitrary degree to approximate an integral over [a, b] providing the roots of the n degree Legendre polynomial.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_laguerre (RealFunction f, unsigned int n=16) | 
| Use Gauss-Laguerre quadrature of degree 2, 4, 8 or 16, using pre-computed values, to approximate an integral over [0, +inf).   | |
| template<typename RealFunction > | |
| real | theoretica::integral_hermite (RealFunction f, const std::vector< real > &x) | 
| Use Gauss-Hermite quadrature of arbitrary degree to approximate an integral over (-inf, +inf) providing the roots of the n degree Hermite polynomial.   | |
| template<typename RealFunction > | |
| real | theoretica::integral_hermite (RealFunction f, unsigned int n=16) | 
| Use Gauss-Hermite quadrature of degree 2, 4, 8 or 16, using pre-computed values, to approximate an integral over (-inf, +inf).   | |
| real | theoretica::integral_inf_riemann (real_function f, real a, real step_sz=1, real tol=CALCULUS_INTEGRAL_TOL, unsigned int max_iter=100) | 
| Integrate a function from a point up to infinity by integrating it by steps, stopping execution when the variation of the integral is small enough or the number of steps reaches a maximum value.  | |
| template<typename RealFunction > | |
| real | theoretica::integral (RealFunction f, real a, real b) | 
| Use the best available algorithm to approximate the definite integral of a real function.   | |
| template<typename RealFunction > | |
| real | theoretica::integral (RealFunction f, real a, real b, real tol) | 
| Use the best available algorithm to approximate the definite integral of a real function to a given tolerance.   | |
Integral approximation.