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

Public Member Functions

 UnaryOpExpression (char op, std::shared_ptr< Expression > operand)
 
virtual double evaluate (const std::map< std::string, double > &variables) const override
 
virtual std::string toString () const override
 
virtual Expression::Type getType () const override
 
virtual std::shared_ptr< Expressionclone () const override
 
virtual std::shared_ptr< Expressionderivative (const std::string &var) const override
 
virtual std::shared_ptr< Expressionsimplify () const override
 
char getOperator () const
 
std::shared_ptr< ExpressiongetOperand () 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 131 of file expression.h.

Constructor & Destructor Documentation

◆ UnaryOpExpression()

UnaryOpExpression::UnaryOpExpression ( char  op,
std::shared_ptr< Expression operand 
)

Definition at line 487 of file expression.cpp.

Member Function Documentation

◆ clone()

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

Implements Expression.

Definition at line 652 of file expression.cpp.

◆ derivative()

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

Implements Expression.

Definition at line 572 of file expression.cpp.

◆ evaluate()

double UnaryOpExpression::evaluate ( const std::map< std::string, double > &  variables) const
overridevirtual

Implements Expression.

Definition at line 497 of file expression.cpp.

◆ getOperand()

std::shared_ptr< Expression > UnaryOpExpression::getOperand ( ) const

Definition at line 565 of file expression.cpp.

◆ getOperator()

char UnaryOpExpression::getOperator ( ) const

Definition at line 560 of file expression.cpp.

◆ getType()

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

Implements Expression.

Definition at line 547 of file expression.cpp.

◆ simplify()

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

Implements Expression.

Definition at line 601 of file expression.cpp.

◆ toString()

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

Implements Expression.

Definition at line 530 of file expression.cpp.


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