PURIFY
Next-generation radio interferometric imaging
integration.h
Go to the documentation of this file.
1 #ifndef PURIFY_INTEGRATION_H
2 #define PURIFY_INTEGRATION_H
3 
4 #include "purify/config.h"
5 #include "purify/types.h"
6 #include <cubature.h>
7 #include "purify/logging.h"
8 
9 namespace purify {
10 namespace integration {
11 enum class norm_type { individual, paired, l1, l2, linf };
12 enum class method { h, p };
14 error_norm norm_error(norm_type norm);
16 t_real integrate(const Vector<t_real> &xmin, const Vector<t_real> &xmax,
17  const std::function<t_real(Vector<t_real>)> &func, const norm_type norm,
18  const t_real required_abs_error, const t_real required_rel_error,
19  const t_uint max_evaluations, const method methodtype);
21 t_complex integrate(const Vector<t_real> &xmin, const Vector<t_real> &xmax,
22  const std::function<t_complex(Vector<t_real>)> &func, const norm_type norm,
23  const t_real required_abs_error, const t_real required_rel_error,
24  const t_uint max_evaluations, const method methodtype);
26 Vector<t_real> integrate(const t_uint fdim, const Vector<t_real> &xmin, const Vector<t_real> &xmax,
27  const std::function<Vector<t_real>(Vector<t_real>)> &func,
28  const norm_type norm, const t_real required_abs_error,
29  const t_real required_rel_error, const t_uint max_evaluations,
30  const method methodtype);
32 Vector<t_complex> integrate_v(const t_uint fdim, const Vector<t_real> &xmin,
33  const Vector<t_real> &xmax,
34  const std::vector<std::function<t_complex(Vector<t_real>)>> &func,
35  const norm_type norm, const t_real required_abs_error,
36  const t_real required_rel_error, const t_uint max_evaluations,
37  const method methodtype);
39 t_complex convolution(const Vector<t_real> &x0, const Vector<t_real> &xmin,
40  const Vector<t_real> &xmax,
41  const std::function<t_complex(Vector<t_real>)> &func1,
42  const std::function<t_complex(Vector<t_real>)> &func2, const norm_type norm,
43  const t_real required_abs_error, const t_real required_rel_error,
44  const t_uint max_evaluations, const method methodtype);
47 t_complex convolution(const Vector<t_real> &x0,
48  const std::function<t_complex(Vector<t_real>)> &func1,
49  const std::function<t_complex(Vector<t_real>)> &func2, const norm_type norm,
50  const t_real required_abs_error, const t_real required_rel_error,
51  const t_uint max_evaluations, const method methodtype);
52 
53 } // namespace integration
54 } // namespace purify
55 
56 #endif
Vector< t_complex > integrate_v(const t_uint fdim, const t_uint npts, const Vector< t_real > &xmin, const Vector< t_real > &xmax, const std::vector< std::function< t_complex(Vector< t_real >)>> &func, const norm_type norm, const t_real required_abs_error, const t_real required_rel_error, const t_uint max_evaluations, const method methodtype)
Definition: integration.cc:115
t_complex convolution(const Vector< t_real > &x0, const Vector< t_real > &xmin, const Vector< t_real > &xmax, const std::function< t_complex(Vector< t_real >)> &func1, const std::function< t_complex(Vector< t_real >)> &func2, const norm_type norm, const t_real required_abs_error, const t_real required_rel_error, const t_uint max_evaluations, const method methodtype)
use adaptive integration to calculate convolution at x0 of func1(x0 - x) * func2(x)
Definition: integration.cc:183
error_norm norm_error(norm_type norm)
return norm used for error
Definition: integration.cc:161
t_real integrate(const Vector< t_real > &xmin, const Vector< t_real > &xmax, const std::function< t_real(Vector< t_real >)> &func, const norm_type norm, const t_real required_abs_error, const t_real required_rel_error, const t_uint max_evaluations, const method methodtype)
adaptive integration with cubature for real scalar to vector
Definition: integration.cc:7