Chebyshev
Unit testing for scientific software
|
Precision estimators. More...
Functions | |
template<typename FloatType = double> | |
auto | quadrature1D () |
Use Simpson's quadrature scheme to approximate error integrals for univariate real functions (endofunctions on real number types). More... | |
template<typename IntType = int, typename ReturnType = IntType> | |
auto | discrete1D () |
Use a discrete estimator over a lattice of points, here implemented in one dimension, to compute error sums over a discrete domain. More... | |
template<typename FloatType = double> | |
auto | montecarlo1D () |
Use crude Monte Carlo integration to approximate error integrals for univariate real functions. More... | |
template<typename FloatType = double, typename Vector = std::vector<FloatType>> | |
auto | montecarlo (unsigned int dimensions) |
Use crude Monte Carlo integration to approximate error integrals for multivariate real functions. More... | |
Precision estimators.
|
inline |
Use a discrete estimator over a lattice of points, here implemented in one dimension, to compute error sums over a discrete domain.
The function is evaluated at the discrete integer values inside the prec::interval domain and the errors are summed and averaged, returning a prec::estimate_result.
ReturnType must be a type that has operator-() and is castable to long double.
|
inline |
Use crude Monte Carlo integration to approximate error integrals for multivariate real functions.
dimensions | The dimension of the space of inputs |
|
inline |
Use crude Monte Carlo integration to approximate error integrals for univariate real functions.
A uniform random sampler is used to sample points over the one-dimensional domain
|
inline |
Use Simpson's quadrature scheme to approximate error integrals for univariate real functions (endofunctions on real number types).
The estimator is returned as a lambda function.