The Set template class allocates a collection of objects of type T along the ConvolutionMap and provides the methods to perform operations between different types of objects T.
More...
#include <set.h>
|
| Set (ConvolutionMap const &Map=ConvolutionMap{"UNDEFINED"}, std::map< int, T > const &in=std::map< int, T > {}) |
| The Set constructor.
|
|
| Set (std::map< int, T > const &in) |
| The Set constructor.
|
|
void | SetMap (ConvolutionMap const &map) |
| This function (re)sets the convolution map.
|
|
void | SetObjects (std::map< int, T > const &objects) |
| This function (re)sets the map of objects.
|
|
T | Combine () const |
| This function sums up all the objects of the set into one.
|
|
T | Combine (std::vector< double > const &weigths) const |
| This function sums up all the objects of the set into one using the components of input vector as weights.
|
|
void | Print () const |
| Print the Operator object.
|
|
|
template<class V > |
Set< V > | operator*= (Set< V > const &d) const |
| operator *= product object
|
|
Set< T > & | operator*= (double const &s) |
| this *= scalar
|
|
Set< T > & | operator*= (std::function< double(double const &)> f) |
| this *= function of the integration variable (for distributions only)
|
|
Set< T > & | operator*= (std::function< std::vector< double >(double const &)> f) |
| this *= function of the integration variable that returns a vector (for distributions only)
|
|
Set< T > & | operator*= (std::vector< double > const &v) |
| this *= vector of scalars
|
|
Set< T > & | operator*= (std::map< int, double > const &v) |
| this *= map of scalars
|
|
Set< T > & | operator/= (double const &s) |
| this /= scalar
|
|
Set< T > & | operator+= (Set< T > const &d) |
| this += Set
|
|
Set< T > & | operator-= (Set< T > const &d) |
| this -= Set
|
|
|
T const & | at (int const &id) const |
| This returns object with ID "id" in the map.
|
|
ConvolutionMap const & | GetMap () const |
| This returns the convolution map.
|
|
std::map< int, T > const & | GetObjects () const |
| This returns the full map of objects.
|
|
|
template<class U > |
std::ostream & | operator<< (std::ostream &os, Set< U > const &s) |
|
template<class T>
class apfel::Set< T >
The Set template class allocates a collection of objects of type T along the ConvolutionMap and provides the methods to perform operations between different types of objects T.
- Examples
- dglap_test.cc, set_test.cc, and tmd_test.cc.
◆ Set() [1/2]
The Set constructor.
- Parameters
-
Map | the convolution map (defualt: empty ConvolutionMap) |
in | a map of objects of type T (defualt: empty map of objects) |
◆ Set() [2/2]
template<class T >
apfel::Set< T >::Set |
( |
std::map< int, T > const & | in | ) |
|
The Set constructor.
- Parameters
-
in | a map of objects of type T (defualt: empty map of objects) |
- Note
- When invoking this constructor a diagonal convolution map is automatically constructed.
◆ at()
template<class T >
T const & apfel::Set< T >::at |
( |
int const & | id | ) |
const |
|
inline |
This returns object with ID "id" in the map.
- Parameters
-
- Examples
- set_test.cc.
◆ Combine() [1/2]
This function sums up all the objects of the set into one.
◆ Combine() [2/2]
template<class T >
T apfel::Set< T >::Combine |
( |
std::vector< double > const & | weigths | ) |
const |
This function sums up all the objects of the set into one using the components of input vector as weights.
- Parameters
-
◆ GetMap()
This returns the convolution map.
◆ GetObjects()
template<class T >
std::map< int, T > const & apfel::Set< T >::GetObjects |
( |
| ) |
const |
|
inline |
This returns the full map of objects.
◆ operator*=() [1/6]
◆ operator*=() [2/6]
template<class T >
template<class V >
operator *= product object
- Parameters
-
d | the left hand side object of type V |
- Returns
- a new object of type V
◆ operator*=() [3/6]
template<class T >
Set< T > & apfel::Set< T >::operator*= |
( |
std::function< double(double const &)> | f | ) |
|
this *= function of the integration variable (for distributions only)
◆ operator*=() [4/6]
template<class T >
Set< T > & apfel::Set< T >::operator*= |
( |
std::function< std::vector< double >(double const &)> | f | ) |
|
this *= function of the integration variable that returns a vector (for distributions only)
◆ operator*=() [5/6]
template<class T >
Set< T > & apfel::Set< T >::operator*= |
( |
std::map< int, double > const & | v | ) |
|
◆ operator*=() [6/6]
template<class T >
Set< T > & apfel::Set< T >::operator*= |
( |
std::vector< double > const & | v | ) |
|
this *= vector of scalars
◆ operator+=()
◆ operator-=()
◆ operator/=()
◆ Print()
◆ SetMap()
This function (re)sets the convolution map.
- Examples
- dglap_test.cc.
◆ SetObjects()
template<class T >
void apfel::Set< T >::SetObjects |
( |
std::map< int, T > const & | objects | ) |
|
|
inline |
This function (re)sets the map of objects.
- Parameters
-
◆ operator<<
template<class T >
template<class U >
std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
Set< U > const & | s ) |
|
friend |
◆ _map
The shared pointer containing the convolution map.
◆ _objects
The container for the map.
The documentation for this class was generated from the following file:
- /Users/vb262523/Codes/apfelxx/inc/apfel/set.h