tfel
Loading...
Searching...
No Matches
tfel::math::parser::StandardBinaryFunction< f > Struct Template Referencefinal
Inheritance diagram for tfel::math::parser::StandardBinaryFunction< f >:
tfel::math::parser::BinaryFunction tfel::math::parser::StandardBinaryFunctionBase tfel::math::parser::Expr

Public Member Functions

 StandardBinaryFunction (const char *const, const std::shared_ptr< Expr >, const std::shared_ptr< Expr >) noexcept
StandardBinaryFunction & operator= (const StandardBinaryFunction &)=delete
StandardBinaryFunction & operator= (StandardBinaryFunction &&)=delete
bool isConstant () const override
 return if the expression is constant
bool dependsOnVariable (const std::vector< double >::size_type) const override
double getValue () const override
std::string getCxxFormula (const std::vector< std::string > &) const override
void checkCyclicDependency (std::vector< std::string > &) const override
 check if the expression does not lead to a cyclic dependency
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
void getParametersNames (std::set< std::string > &) const override
Public Member Functions inherited from tfel::math::parser::Expr
virtual ~Expr ()
 destructor

Additional Inherited Members

Static Protected Member Functions inherited from tfel::math::parser::StandardBinaryFunctionBase
static void throwUnimplementedDifferentiateFunctionException ()
static void throwInvalidCallException (const int)
static std::string getCxxFormula (const char *const, const std::string &, const std::string &)
 build the C++ formula resulting from the evolution of a binary function.

Constructor & Destructor Documentation

◆ StandardBinaryFunction()

template<double(*)(const double, const double) f>
tfel::math::parser::StandardBinaryFunction< f >::StandardBinaryFunction ( const char * const n,
const std::shared_ptr< Expr > e1,
const std::shared_ptr< Expr > e2 )
noexcept
Parameters
[in]nname of the function
[in]e1first argument
[in]e2second argument

Member Function Documentation

◆ checkCyclicDependency()

template<double(*)(const double, const double) f>
void tfel::math::parser::StandardBinaryFunction< f >::checkCyclicDependency ( std::vector< std::string > & ) const
overridevirtual

check if the expression does not lead to a cyclic dependency

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

◆ clone()

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

◆ createFunctionByChangingParametersIntoVariables()

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

◆ dependsOnVariable()

template<double(*)(const double, const double) f>
bool tfel::math::parser::StandardBinaryFunction< f >::dependsOnVariable ( const std::vector< double >::size_type ) const
nodiscardoverridevirtual
Returns
if the expression depends of the variable associated with the given position
Parameters
[in]pposition

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

◆ differentiate()

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

◆ getCxxFormula()

template<double(*)(const double, const double) f>
std::string tfel::math::parser::StandardBinaryFunction< 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.

◆ getParametersNames()

template<double(*)(const double, const double) f>
void tfel::math::parser::StandardBinaryFunction< f >::getParametersNames ( std::set< std::string > & p) const
overridevirtual

◆ getValue()

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

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

◆ isConstant()

template<double(*)(const double, const double) f>
bool tfel::math::parser::StandardBinaryFunction< f >::isConstant ( ) const
nodiscardoverridevirtual

return if the expression is constant

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

◆ resolveDependencies()

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

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