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

Public Member Functions

 Function (const std::string &fname, std::shared_ptr< Expression > arg)
 
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 getFunctionName () const
 
std::shared_ptr< ExpressiongetArgument () 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 107 of file expression.h.

Constructor & Destructor Documentation

◆ Function()

Function::Function ( const std::string &  fname,
std::shared_ptr< Expression arg 
)

Definition at line 323 of file expression.cpp.

Member Function Documentation

◆ clone()

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

Implements Expression.

Definition at line 477 of file expression.cpp.

◆ derivative()

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

Implements Expression.

Definition at line 334 of file expression.cpp.

◆ evaluate()

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

Implements Expression.

Definition at line 431 of file expression.cpp.

◆ getArgument()

std::shared_ptr< Expression > Function::getArgument ( ) const
inline

Definition at line 125 of file expression.h.

◆ getFunctionName()

std::string Function::getFunctionName ( ) const
inline

Definition at line 123 of file expression.h.

◆ getType()

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

Implements Expression.

Definition at line 472 of file expression.cpp.

◆ simplify()

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

Implements Expression.

Definition at line 382 of file expression.cpp.

◆ toString()

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

Implements Expression.

Definition at line 329 of file expression.cpp.


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