tfel
Loading...
Searching...
No Matches
tfel::math::parser::Number Struct Referencefinal

Expression representing a number. More...

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

Inheritance diagram for tfel::math::parser::Number:
tfel::math::parser::Expr

Public Member Functions

 Number (const std::string &, const double)
 constructor
Number & operator= (const Number &)=delete
Number & operator= (Number &&)=delete
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
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 > resolveDependencies (const std::vector< double > &) const override
void getParametersNames (std::set< std::string > &) 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
std::string getCxxFormula (const std::vector< std::string > &) const override
double getValue () const override
 ~Number () override
 destructor
Public Member Functions inherited from tfel::math::parser::Expr
virtual ~Expr ()
 destructor

Static Public Member Functions

static std::shared_ptr< Number > zero ()
 return an expression associated with zero
static std::shared_ptr< Number > one ()
 return an expression associated with one

Detailed Description

Expression representing a number.

Constructor & Destructor Documentation

◆ Number()

tfel::math::parser::Number::Number ( const std::string & ,
const double  )

constructor

Parameters
[in]sstring representation of the number
[in]vvalue

Member Function Documentation

◆ checkCyclicDependency()

void tfel::math::parser::Number::checkCyclicDependency ( std::vector< std::string > & ) const
overridevirtual

check if the expression does not lead to a cyclic dependency

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

◆ clone()

std::shared_ptr< Expr > tfel::math::parser::Number::clone ( const std::vector< double > & ) const
nodiscardoverridevirtual

◆ createFunctionByChangingParametersIntoVariables()

std::shared_ptr< Expr > tfel::math::parser::Number::createFunctionByChangingParametersIntoVariables ( const std::vector< double > & ,
const std::vector< std::string > & ,
const std::map< std::string, std::vector< double >::size_type > &  ) const
nodiscardoverridevirtual

◆ dependsOnVariable()

bool tfel::math::parser::Number::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()

std::shared_ptr< Expr > tfel::math::parser::Number::differentiate ( const std::vector< double >::size_type ,
const std::vector< double > &  ) const
nodiscardoverridevirtual

◆ getCxxFormula()

std::string tfel::math::parser::Number::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()

void tfel::math::parser::Number::getParametersNames ( std::set< std::string > & ) const
overridevirtual

◆ getValue()

double tfel::math::parser::Number::getValue ( ) const
nodiscardoverridevirtual
Returns
the result of the evaluation of the expression

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

◆ isConstant()

bool tfel::math::parser::Number::isConstant ( ) const
nodiscardoverridevirtual

return if the expression is constant

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

◆ resolveDependencies()

std::shared_ptr< Expr > tfel::math::parser::Number::resolveDependencies ( const std::vector< double > & ) const
nodiscardoverridevirtual

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