RandLib 2.0.0
Probability distributions, fitting, and heavy-tail tools for C++20
Loading...
Searching...
No Matches
quadrature.hpp File Reference
#include <algorithm>
#include <cmath>
#include <concepts>
#include <complex>
#include <limits>
#include <numbers>
#include <stdexcept>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for quadrature.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  randlib::math::detail::Segment< Real >
 

Namespaces

namespace  randlib
 
namespace  randlib::math
 Beta-related functions.
 
namespace  randlib::math::detail
 

Functions

template<std::floating_point Real>
std::pair< std::complex< Real >, Real > randlib::math::detail::accelerateOscillatorySums (const std::vector< std::complex< Real > > &partialSums)
 
template<std::floating_point Real, class F >
Segment< Real > randlib::math::detail::gaussKronrod21 (const F &f, Real a, Real b, Real &absEstimate)
 21-point Gauss-Kronrod rule with its embedded 10-point Gauss rule (QUADPACK qk21)
 
template<std::floating_point Real, class F >
Real randlib::math::detail::integrateFinite (const F &f, Real a, Real b, Real tolerance, int maxSubdivisions)
 Global adaptive scheme (QUADPACK QAG) on a finite interval.
 
template<std::floating_point Real, class F >
Real randlib::math::detail::evaluateTanhSinh (const F &f, Real x, Real endpointDistance)
 
template<std::floating_point Real, class F >
std::pair< Real, Real > randlib::math::detail::tanhSinhLevel (const F &f, Real a, Real b, Real step)
 
template<std::floating_point Real = double, class F >
Real randlib::math::integrate (const F &f, std::type_identity_t< Real > a, std::type_identity_t< Real > b, std::type_identity_t< Real > tolerance=1e-11, int maxSubdivisions=512)
 Global adaptive Gauss-Kronrod quadrature (QUADPACK QAG).
 
template<std::floating_point Real = double, class F >
Real randlib::math::integrateTanhSinh (const F &f, std::type_identity_t< Real > a, std::type_identity_t< Real > b, std::type_identity_t< Real > tolerance=1e-11, int maxRefinements=12)
 Double-exponential tanh-sinh quadrature on a finite interval.
 
template<std::floating_point Real, class F , class TailMass >
std::complex< Real > randlib::math::detail::integrateHalfPeriods (const F &amplitude, Real frequency, Real lower, Real tolerance, int maxCycles, const TailMass &tailMass)
 
template<std::floating_point Real = double, class F >
std::complex< Real > randlib::math::integrateOscillatory (const F &amplitude, std::type_identity_t< Real > frequency, std::type_identity_t< Real > lower=0, std::type_identity_t< Real > tolerance=1e-10, int maxCycles=512)
 QAWF-style Fourier integral on a semi-infinite interval.
 
template<std::floating_point Real = double, class F , class TailMass >
requires std::invocable<const TailMass &, Real>
std::complex< Real > randlib::math::integrateOscillatory (const F &amplitude, std::type_identity_t< Real > frequency, std::type_identity_t< Real > lower, const TailMass &tailMass, std::type_identity_t< Real > tolerance=1e-10, int maxCycles=512)
 QAWF-style Fourier integral of an amplitude with a known tail bound: the half-period walk stops once the remaining mass is below the tolerance, and is accelerated only beyond half of the mass.