APFEL 4.8.0
A PDF evolution library in C++
Loading...
Searching...
No Matches
operator.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/expression.h"
10#include "apfel/distribution.h"
11#include "apfel/matrix.h"
12
13namespace apfel
14{
22 {
23 public:
24 Operator() = delete;
25 Operator(Operator const&) = default;
26
34 Operator(Grid const& gr, Expression const& expr, double const& eps = 1e-5, bool const& gpd = false);
35
39 virtual ~Operator() {}
40
48 Operator& operator *= (double const& s);
49 Operator& operator *= (std::function<double(double const&)> f);
50 Operator& operator /= (double const& s);
54
59
64
70 Distribution Evaluate(double const& x) const;
71
75 Grid const& GetGrid() const { return _grid; }
76
80 Expression const& GetExpression() const { return _expr; }
81
85 double const& GetIntegrationAccuracy() const { return _eps; }
86
90 bool const& IsGPD() const { return _gpd; }
91
95 std::vector<matrix<double>> GetOperator() const { return _Operator; }
96
100 void Print() const { std::cout << *this << std::endl; }
101
102 protected:
103 Grid const& _grid;
105 double const _eps;
106 bool const _gpd;
107 std::vector<matrix<double>> _Operator;
108
109 friend std::ostream& operator << (std::ostream& os, Operator const& sg);
110 };
111
118 Operator operator * (double const& s, Operator rhs);
119 Operator operator * (Operator lhs, double const& s);
120 Operator operator * (std::function<double(double const&)> f, Operator rhs);
121 Operator operator * (Operator lhs, std::function<double(double const&)> f);
122 Operator operator / (Operator lhs, double const& s);
126
132 std::ostream& operator << (std::ostream& os, Operator const& op);
133}
The Distribution class defines one of the basic objects of APFEL++. This is essentially the discretis...
Definition distribution.h:22
The Expression class encapsulates in a proper form a given analytic expression in such a way that it ...
Definition expression.h:17
The Grid class defines ab object that is essentially a collection of "SubGrid" objects plus other glo...
Definition grid.h:22
The Operator class defines the basic object "Operator" which is essentially the convolution on the gr...
Definition operator.h:22
friend std::ostream & operator<<(std::ostream &os, Operator const &sg)
Method which prints Operator with cout <<. This only prints the Operator on the first subgrid and is ...
Grid const & _grid
Grid on which to compute the operator.
Definition operator.h:103
void Print() const
Print the Operator object.
Definition operator.h:100
double const & GetIntegrationAccuracy() const
Function that returns the integration accuracy.
Definition operator.h:85
Operator & operator+=(Operator const &o)
this += Operator
Operator & operator=(Operator const &o)
this = Operator
std::vector< matrix< double > > _Operator
Operator values.
Definition operator.h:107
virtual ~Operator()
The Operator virtual destructor.
Definition operator.h:39
Operator & operator-=(Operator const &o)
this -= Operator
bool const & IsGPD() const
Function that returns the GPD switch.
Definition operator.h:90
bool const _gpd
GPD switch.
Definition operator.h:106
std::vector< matrix< double > > GetOperator() const
Function that returns the operator.
Definition operator.h:95
Grid const & GetGrid() const
Function that returns the Grid object associated to the operator.
Definition operator.h:75
Expression const & _expr
Expression to be used.
Definition operator.h:104
Operator(Grid const &gr, Expression const &expr, double const &eps=1e-5, bool const &gpd=false)
The Operator constructor.
Operator & operator/=(double const &s)
this /= Scalar
Operator(Operator const &)=default
Operator()=delete
Distribution operator*=(Distribution const &d) const
this *= Distribution
Expression const & GetExpression() const
Function that returns the Expression object associated to the operator.
Definition operator.h:80
Distribution Evaluate(double const &x) const
Function that interpolates the operator over the first index return a Distribution object.
void BuildOperatorDGLAP()
Function that builds a DGLAP-like operator.
void BuildOperatorGPD()
Function that builds a GPD-like operator.
double const _eps
Integration accuracy.
Definition operator.h:105
Namespace for all APFEL++ functions and classes.
Definition alphaqcd.h:14
Distribution operator/(Distribution lhs, double const &s)
Distribution/Scalar.
Distribution operator*(double const &s, Distribution rhs)
Scalar*Distribution.
Distribution operator+(Distribution lhs, Distribution const &rhs)
Distribution+Distribution.
std::ostream & operator<<(std::ostream &os, ConvolutionMap const &cm)
Method which prints ConvolutionMap with cout <<.
Distribution operator-(Distribution lhs, Distribution const &rhs)
Distribution-Distribution.