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

Detailed Description

Definition at line 214 of file Expression.h.

Public Member Functions

template<typename function_type>
 LambdaExpression (const function_type &function)
 
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.
 

Public Attributes

std::function< double(void)> m_function
 
std::string m_name
 
Inheritance diagram for AmpGen::LambdaExpression:
AmpGen::IExpression

Constructor & Destructor Documentation

◆ LambdaExpression()

template<typename function_type>
AmpGen::LambdaExpression::LambdaExpression ( const function_type & function)
inline

Definition at line 217 of file Expression.h.

Member Function Documentation

◆ operator Expression()

AmpGen::LambdaExpression::operator Expression ( ) const

◆ operator()()

complex_t AmpGen::LambdaExpression::operator() ( ) const
overridevirtual

Implements AmpGen::IExpression.

◆ resolve()

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

Implements AmpGen::IExpression.

◆ to_string()

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

Implements AmpGen::IExpression.

Member Data Documentation

◆ m_function

std::function<double(void)> AmpGen::LambdaExpression::m_function

Definition at line 222 of file Expression.h.

◆ m_name

std::string AmpGen::LambdaExpression::m_name

Definition at line 223 of file Expression.h.


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