APFEL 4.8.0
A PDF evolution library in C++
Loading...
Searching...
No Matches
integrator2d.h
Go to the documentation of this file.
1//
2// APFEL++ 2017
3//
4// Author: Valerio Bertone: valerio.bertone@cern.ch
5//
6
7#pragma once
8
9#include "apfel/integrator.h"
10
11namespace apfel
12{
18 {
19 public:
25
30 Integrator2D(std::function<double(double const&, double const&)> const& func, Integrator::IntegrationMethod const& method = Integrator::GAUSS_KRONROD);
31
42 double integrate(double const& xmin, double const& xmax, double const& ymin, double const& ymax, double const& eps) const;
43
55 std::pair<double, double> integrateGL(double const& xmin, double const& xmax, double const& ymin, double const& ymax) const;
56
68 std::pair<double, double> integrateGK(double const& xmin, double const& xmax, double const& ymin, double const& ymax) const;
69
76 double integrand(double const& x, double const& y) const { return _func(x, y); };
77
78 private:
79 std::function<double(double const&, double const&)> const _func;
81 };
82}
The Integrator2D class performs two-dimensional numerical integrations using the Guassian quadrature.
Definition integrator2d.h:18
std::function< double(double const &, double const &)> cons _func)
The integrand function.
Definition integrator2d.h:79
double integrand(double const &x, double const &y) const
Function for the integrand.
Definition integrator2d.h:76
std::pair< double, double > integrateGL(double const &xmin, double const &xmax, double const &ymin, double const &ymax) const
Function that integrates the integrand with a using the 8x8 and 16x16 Gauss-Legendre method.
double integrate(double const &xmin, double const &xmax, double const &ymin, double const &ymax, double const &eps) const
Function that integrates the integrand with a given relative accuracy using the method defined in the...
Integrator::IntegrationMethod const _method
The integration method.
Definition integrator2d.h:80
std::pair< double, double > integrateGK(double const &xmin, double const &xmax, double const &ymin, double const &ymax) const
Function that integrates the integrand with a using the 7x7 and 15x15 Gauss-Kronrod method.
Integrator2D(std::function< double(double const &, double const &)> const &func, Integrator::IntegrationMethod const &method=Integrator::GAUSS_KRONROD)
The Integrator constructor.
IntegrationMethod
Definition integrator.h:25
@ GAUSS_KRONROD
Definition integrator.h:25
Namespace for all APFEL++ functions and classes.
Definition alphaqcd.h:14