#include "../../Matrix.h"
#include "../../sorting.h"
#include "../utils.h"
#include <functional>
Go to the source code of this file.
|
std::pair< double, std::vector< double > > | integration::quad_adaptive_rec (const std::function< double(double)> &fun, const double &a, const double &b, const double &tol, const double &hMin, std::vector< double > &nodes, Matrix< double > &values) |
|
std::pair< double, std::vector< double > > | quadrature (const std::function< double(double)> &fun, const double &lower, const double &upper, const double &tol, const double &hMin) |
|
◆ quadrature()
std::pair< double, std::vector< double > > quadrature |
( |
const std::function< double(double)> & |
fun, |
|
|
const double & |
lower, |
|
|
const double & |
upper, |
|
|
const double & |
tol, |
|
|
const double & |
hMin |
|
) |
| |
Calculates the given exact integral
\begin{equation} \int \limits_{l}^{u} f(x) dx \end{equation} where $l$ := lower boundary, and $u$ := upper boundary
- Parameters
-
fun | Function to calculate exact integral of |
lower | lower boundary of integral |
upper | upper boundary of integral |
tol | tolerance of result to exact solution |
hMin | minimal distance between approximation points |
- Returns
- approximated exact integral of fun
- Examples
- numerics/analysis/TestIntegration.cpp.