CepGen 1.2.5
Central exclusive processes event generator
|
A string-to-functional parser. More...
#include <CepGen/Utils/Functional.h>
Public Member Functions | |
Functional (const ParametersList &) | |
Default constructor. | |
double | operator() (double x) const |
Compute the functional for a given value of the variable (one-dimensional case) | |
double | operator() (const std::vector< double > &x) const |
Compute the functional for a given value of the variables. | |
const std::vector< std::string > & | variables () const |
List of string variable names. | |
const std::string & | expression () const |
String expression held by this functional parser. | |
const std::string & | name () const |
Module unique indexing name. | |
bool | operator== (const SteeredObject &oth) const |
Equality operator. | |
bool | operator!= (const SteeredObject &oth) const |
Inequality operator. | |
const ParametersList & | parameters () const override |
Module user-defined parameters. | |
virtual void | setParameters (const ParametersList ¶ms) override |
Set module parameters. | |
void | setDescribedParameters (const ParametersList ¶ms_orig) |
Set (documented) module parameters. | |
Static Public Member Functions | |
static ParametersList | fromExpression (const std::string &expr, const std::vector< std::string > &vars) |
Build a collection of parameters to define a functional from its mathematical expression. | |
static ParametersDescription | description () |
Protected Member Functions | |
virtual double | eval () const =0 |
Compute the functional for a given value of the variables. | |
template<typename T > | |
T | steer (const std::string &key) const |
Retrieve a parameters as previously steered. | |
template<typename T , typename U > | |
U | steerAs (const std::string &key) const |
Retrieve a recasted parameters as previously steered. | |
std::string | steerName () const |
Retrieve module name from parameters. | |
std::string | steerPath (const std::string &key) const |
Retrieve a path from common search paths. | |
Protected Attributes | |
std::vector< std::string > | vars_ |
Computer-readable variable to be reached. | |
std::string | expression_ |
Computer-readable expression. | |
std::vector< double > | values_ |
Last arguments list fed to the functional. | |
const std::string | name_ |
Module unique indexing name. | |
ParametersList | params_ |
Module parameters. | |
Definition at line 32 of file Functional.h.
|
explicit |
Definition at line 26 of file Functional.cpp.
|
static |
Definition at line 57 of file Functional.cpp.
|
protectedpure virtual |
Implemented in FunctionalLibmatheval, Functional, FunctionalExprTk, FunctionalMuParser, FunctionalTinyExpr, and Functional.
const std::string & expression | ( | ) | const |
Definition at line 52 of file Functional.h.
|
static |
[in] | expr | Mathematical expression to evaluate |
[in] | vars | List of expression variables |
Definition at line 53 of file Functional.cpp.
|
inherited |
Definition at line 42 of file NamedModule.h.
|
inherited |
Definition at line 51 of file SteeredObject.h.
double operator() | ( | const std::vector< double > & | x | ) | const |
[in] | x | Variables values |
Definition at line 45 of file Functional.cpp.
double operator() | ( | double | x | ) | const |
[in] | x | Variable value |
Definition at line 39 of file Functional.cpp.
|
inherited |
Definition at line 49 of file SteeredObject.h.
|
overridevirtualinherited |
Reimplemented from Steerable.
Definition at line 54 of file SteeredObject.h.
|
inherited |
Definition at line 73 of file SteeredObject.h.
|
overridevirtualinherited |
Reimplemented from Steerable.
Reimplemented in Initial, Remnants, CutsList, IncomingBeams, and Kinematics.
Definition at line 62 of file SteeredObject.h.
|
protectedinherited |
Definition at line 39 of file Steerable.h.
Definition at line 44 of file Steerable.h.
|
protectedinherited |
Definition at line 48 of file Steerable.h.
|
protectedinherited |
Definition at line 30 of file Steerable.cpp.
const std::vector< std::string > & variables | ( | ) | const |
Definition at line 50 of file Functional.h.
|
protected |
Definition at line 63 of file Functional.h.
|
protectedinherited |
Definition at line 45 of file NamedModule.h.
|
mutableprotectedinherited |
Definition at line 50 of file Steerable.h.
|
mutableprotected |
Definition at line 64 of file Functional.h.
|
protected |
Definition at line 62 of file Functional.h.