APFEL 4.8.0
A PDF evolution library in C++
Loading...
Searching...
No Matches
subgrid.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 <vector>
10#include <iostream>
11
12namespace apfel
13{
22 class SubGrid
23 {
24 public:
31 SubGrid(int const& nx, double const& xMin, int const& InterDegree);
32
38 SubGrid(std::vector<double> const& xsg, int const& InterDegree);
39
45 bool operator == (SubGrid const& sg) const;
46 bool operator != (SubGrid const& sg) const;
47
48 // Getters
49 int nx() const { return _nx; }
50 int InterDegree() const { return _InterDegree; }
51 double xMin() const { return _xMin; }
52 double xMax() const { return _xMax; }
53 double Step() const { return _Step; }
54 std::vector<double> const& GetGrid() const { return _xsg; }
55 std::vector<double> const& GetLogGrid() const { return _lxsg; }
56 void Print() const { std::cout << *this << std::endl; }
57
58 private:
59 int _nx;
61 double _xMin;
62 double _xMax;
63 double _Step;
64 std::vector<double> _xsg;
65 std::vector<double> _lxsg;
66
67 friend std::ostream& operator << (std::ostream& os, SubGrid const& sg);
68 };
69
73 std::ostream& operator << (std::ostream& os, SubGrid const& sg);
74}
Class for the x-space interpolation SubGrids.
Definition subgrid.h:23
int InterDegree() const
return the interpolation degree
Definition subgrid.h:50
std::vector< double > _xsg
Actual grid.
Definition subgrid.h:64
friend std::ostream & operator<<(std::ostream &os, SubGrid const &sg)
Method which prints SubGrid with cout <<.
SubGrid(std::vector< double > const &xsg, int const &InterDegree)
The SubGrid constructor.
std::vector< double > const & GetLogGrid() const
return the log-grid
Definition subgrid.h:55
bool operator==(SubGrid const &sg) const
Check whether SubGrids are equal.
int _nx
Number intervals.
Definition subgrid.h:59
void Print() const
print the SubGrid object
Definition subgrid.h:56
double xMax() const
return the maximum node value
Definition subgrid.h:52
double xMin() const
return the minimum node value
Definition subgrid.h:51
double Step() const
return the step size of the log grid
Definition subgrid.h:53
int _InterDegree
Interpolation degree.
Definition subgrid.h:60
double _xMin
Minumim value of x.
Definition subgrid.h:61
double _xMax
Maximum value of x (should always be 1)
Definition subgrid.h:62
int nx() const
return the number of x points
Definition subgrid.h:49
std::vector< double > const & GetGrid() const
return the grid
Definition subgrid.h:54
double _Step
Step of the logarthmically spaced grid.
Definition subgrid.h:63
std::vector< double > _lxsg
The log of the grid.
Definition subgrid.h:65
SubGrid(int const &nx, double const &xMin, int const &InterDegree)
The SubGrid constructor.
bool operator!=(SubGrid const &sg) const
Namespace for all APFEL++ functions and classes.
Definition alphaqcd.h:14
std::ostream & operator<<(std::ostream &os, ConvolutionMap const &cm)
Method which prints ConvolutionMap with cout <<.