tfel
Loading...
Searching...
No Matches
tfel::math::parser::StandardFunction< f > Struct Template Referencefinal

implementation of an unary function from a standard C-function More...

#include </home/runner/work/tfel/tfel/include/TFEL/Math/Parser/Function.hxx>

Inheritance diagram for tfel::math::parser::StandardFunction< f >:
tfel::math::parser::Function tfel::math::parser::Expr

Public Member Functions

 StandardFunction (const char *const, const std::shared_ptr< Expr >) noexcept
StandardFunction & operator= (const StandardFunction &)=delete
StandardFunction & operator= (StandardFunction &&)=delete
double getValue () const override
std::string getCxxFormula (const std::vector< std::string > &) const override
std::shared_ptr< Expr > resolveDependencies (const std::vector< double > &) const override
std::shared_ptr< Expr > differentiate (const std::vector< double >::size_type, const std::vector< double > &) const override
std::shared_ptr< Expr > clone (const std::vector< double > &) const override
std::shared_ptr< Expr > createFunctionByChangingParametersIntoVariables (const std::vector< double > &, const std::vector< std::string > &, const std::map< std::string, std::vector< double >::size_type > &) const override
 ~StandardFunction () override
 destructor
std::string getCxxFormula (const std::vector< std::string > &) const
 the Heaviside function has no C++ counterpart: a conditional expression is used.
Public Member Functions inherited from tfel::math::parser::Function
bool isConstant () const override
 return if the expression is constant
bool dependsOnVariable (const std::vector< double >::size_type) const override
void checkCyclicDependency (std::vector< std::string > &) const override
 check if the expression does not lead to a cyclic dependency
void getParametersNames (std::set< std::string > &) const override
 ~Function () override
 destructor
Public Member Functions inherited from tfel::math::parser::Expr
virtual ~Expr ()
 destructor

Additional Inherited Members

Protected Member Functions inherited from tfel::math::parser::Function
 Function (const std::shared_ptr< Expr >) noexcept
 constructor
Protected Attributes inherited from tfel::math::parser::Function
const std::shared_ptr< Expr > expr
 argument

Detailed Description

template<StandardFunctionPtr f>
struct tfel::math::parser::StandardFunction< f >

implementation of an unary function from a standard C-function

Constructor & Destructor Documentation

◆ StandardFunction()

template<StandardFunctionPtr f>
tfel::math::parser::StandardFunction< f >::StandardFunction ( const char * const n,
const std::shared_ptr< Expr > e )
noexcept
Parameters
[in]nname of the function
[in]eexpression

Member Function Documentation

◆ clone()

template<StandardFunctionPtr f>
std::shared_ptr< Expr > tfel::math::parser::StandardFunction< f >::clone ( const std::vector< double > & v) const
nodiscardoverridevirtual

◆ createFunctionByChangingParametersIntoVariables()

template<StandardFunctionPtr f>
std::shared_ptr< Expr > tfel::math::parser::StandardFunction< f >::createFunctionByChangingParametersIntoVariables ( const std::vector< double > & v,
const std::vector< std::string > & p,
const std::map< std::string, std::vector< double >::size_type > & pos ) const
nodiscardoverridevirtual

◆ differentiate()

template<StandardFunctionPtr f>
std::shared_ptr< Expr > tfel::math::parser::StandardFunction< f >::differentiate ( const std::vector< double >::size_type pos,
const std::vector< double > & v ) const
nodiscardoverridevirtual

◆ getCxxFormula() [1/2]

std::string tfel::math::parser::StandardFunction< Evaluator::Heavyside >::getCxxFormula ( const std::vector< std::string > & ) const
virtual

the Heaviside function has no C++ counterpart: a conditional expression is used.

Implements tfel::math::parser::Expr.

◆ getCxxFormula() [2/2]

template<StandardFunctionPtr f>
std::string tfel::math::parser::StandardFunction< f >::getCxxFormula ( const std::vector< std::string > & ) const
nodiscardoverridevirtual
Returns
a string representation of the evaluator suitable to be integrated in a C++ code.
Parameters
[in]ma map used to change the names of the variables

Implements tfel::math::parser::Expr.

◆ getValue()

template<StandardFunctionPtr f>
double tfel::math::parser::StandardFunction< f >::getValue ( ) const
nodiscardoverridevirtual
Returns
the result of the evaluation of the expression

Implements tfel::math::parser::Expr.

◆ resolveDependencies()

template<StandardFunctionPtr f>
std::shared_ptr< Expr > tfel::math::parser::StandardFunction< f >::resolveDependencies ( const std::vector< double > & v) const
nodiscardoverridevirtual

The documentation for this struct was generated from the following files: