sokobo
Loading...
Searching...
No Matches
Variable Class Reference
Inheritance diagram for Variable:
Expression

Public Member Functions

 Variable (const std::string &n)
 
std::string toString () const override
 
std::shared_ptr< Expressionderivative (const std::string &var) const override
 
std::shared_ptr< Expressionsimplify () const override
 
double evaluate (const std::map< std::string, double > &vars={}) const override
 
Type getType () const override
 
std::shared_ptr< Expressionclone () const override
 
std::string getName () const
 
virtual std::string toString () const =0
 
virtual std::shared_ptr< Expressionderivative (const std::string &var) const =0
 
virtual std::shared_ptr< Expressionsimplify () const =0
 
virtual double evaluate (const std::map< std::string, double > &vars={}) const =0
 
virtual Type getType () const =0
 
virtual std::shared_ptr< Expressionclone () const =0
 

Additional Inherited Members

- Public Types inherited from Expression
enum  Type {
  CONSTANT , VARIABLE , BINARY_OP , UNARY_OP ,
  FUNCTION
}
 

Detailed Description

Definition at line 48 of file expression.h.

Constructor & Destructor Documentation

◆ Variable()

Variable::Variable ( const std::string &  n)

Definition at line 50 of file expression.cpp.

Member Function Documentation

◆ clone()

std::shared_ptr< Expression > Variable::clone ( ) const
overridevirtual

Implements Expression.

Definition at line 88 of file expression.cpp.

◆ derivative()

std::shared_ptr< Expression > Variable::derivative ( const std::string &  var) const
overridevirtual

Implements Expression.

Definition at line 60 of file expression.cpp.

◆ evaluate()

double Variable::evaluate ( const std::map< std::string, double > &  vars = {}) const
overridevirtual

Implements Expression.

Definition at line 73 of file expression.cpp.

◆ getName()

std::string Variable::getName ( ) const
inline

Definition at line 63 of file expression.h.

◆ getType()

Expression::Type Variable::getType ( ) const
overridevirtual

Implements Expression.

Definition at line 83 of file expression.cpp.

◆ simplify()

std::shared_ptr< Expression > Variable::simplify ( ) const
overridevirtual

Implements Expression.

Definition at line 68 of file expression.cpp.

◆ toString()

std::string Variable::toString ( ) const
overridevirtual

Implements Expression.

Definition at line 55 of file expression.cpp.


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