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

Detailed Description

Definition at line 158 of file Expression.h.

Public Member Functions

template<typename T1, typename T2, typename = std::enable_if_t< std::is_constructible< complex_t, T1, T2 >::value >>
 Constant (const T1 &real, const T2 &imag=0)
 
 Constant (const complex_t &value)
 
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.
 
 operator Expression () const
 
complex_t operator() () const override
 Evaluate the expression using the tree, will generally be very slow but ocassionally useful for debugging.
 
Inheritance diagram for AmpGen::Constant:
AmpGen::IExpression

Constructor & Destructor Documentation

◆ Constant() [1/2]

template<typename T1, typename T2, typename = std::enable_if_t< std::is_constructible< complex_t, T1, T2 >::value >>
AmpGen::Constant::Constant ( const T1 & real,
const T2 & imag = 0 )
inline

Definition at line 163 of file Expression.h.

◆ Constant() [2/2]

AmpGen::Constant::Constant ( const complex_t & value)
inline

Definition at line 165 of file Expression.h.

Member Function Documentation

◆ operator Expression()

AmpGen::Constant::operator Expression ( ) const

◆ operator()()

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

Implements AmpGen::IExpression.

Definition at line 169 of file Expression.h.

◆ resolve()

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

Implements AmpGen::IExpression.

◆ to_string()

std::string AmpGen::Constant::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: