AmpGen 2.1
Loading...
Searching...
No Matches
AmpGen::Variable Class Reference

Detailed Description

Class to contain a parameter. In general, this will include global function parameters such as masses and widths, as well as the event buffer (i.e. kinematic quantities), which should be stored in two separated parameter packs. There is also limited support for handling more complex function parameters to functions, such as cache states, but this currently requires manually specifying the argument ordering.

Definition at line 180 of file Expression.h.

Public Member Functions

 Variable (const std::string &name="", const double &defaultValue=0, const bool &resolved=false)
std::string to_string (const ASTResolver *resolver=nullptr) const override
 Called to convert the Expression tree into source code.
void resolve (ASTResolver &resolver) const override
 Resolve the dependencies of a tree using an ASTResolver, which keeps track of parameters, dependent sub-trees, etc.
virtual operator Expression () const
complex_t operator() () const override
 Evaluate the expression using the tree, will generally be very slow but ocassionally useful for debugging.
std::string name () const
const double & defaultValue () const
double & defaultValue ()
bool isResolved () const
Inheritance diagram for AmpGen::Variable:
AmpGen::IExpression

Constructor & Destructor Documentation

◆ Variable()

AmpGen::Variable::Variable ( const std::string & name = "",
const double & defaultValue = 0,
const bool & resolved = false )

Member Function Documentation

◆ defaultValue() [1/2]

double & AmpGen::Variable::defaultValue ( )
inline

Definition at line 189 of file Expression.h.

◆ defaultValue() [2/2]

const double & AmpGen::Variable::defaultValue ( ) const
inline

Definition at line 188 of file Expression.h.

◆ isResolved()

bool AmpGen::Variable::isResolved ( ) const
inline

Definition at line 190 of file Expression.h.

◆ name()

std::string AmpGen::Variable::name ( ) const
inline

Definition at line 187 of file Expression.h.

◆ operator Expression()

virtual AmpGen::Variable::operator Expression ( ) const
virtual

◆ operator()()

complex_t AmpGen::Variable::operator() ( ) const
inlineoverridevirtual

Implements AmpGen::IExpression.

Definition at line 186 of file Expression.h.

◆ resolve()

void AmpGen::Variable::resolve ( ASTResolver & resolver) const
overridevirtual
Parameters
resolverresolver object to use

Implements AmpGen::IExpression.

◆ to_string()

std::string AmpGen::Variable::to_string ( const ASTResolver * resolver = nullptr) const
overridevirtual
Returns
The source code as a string

Implements AmpGen::IExpression.


The documentation for this class was generated from the following file: