#include <Operation.h>

Public Types | |
| enum | Id { CONSTANT , VARIABLE , CUSTOM , ADD , SUBTRACT , MULTIPLY , DIVIDE , POWER , NEGATE , SQRT , EXP , LOG , SIN , COS , SEC , CSC , TAN , COT , ASIN , ACOS , ATAN , ATAN2 , SINH , COSH , TANH , ERF , ERFC , STEP , DELTA , NANDELTA , SQUARE , CUBE , RECIPROCAL , ADD_CONSTANT , MULTIPLY_CONSTANT , POWER_CONSTANT , MIN , MAX , ABS , FLOOR , CEIL , SELECT , ACOT , ASEC , ACSC , COTH , SECH , CSCH , ASINH , ACOSH , ATANH , ACOTH , ASECH , ACSCH } |
| This enumeration lists all Operation subclasses. More... | |
Public Member Functions | |
| Max () | |
| Operation * | clone () const |
| Create a clone of this Operation. | |
| ExpressionTreeNode | differentiate (const std::vector< ExpressionTreeNode > &children, const std::vector< ExpressionTreeNode > &childDerivs, const std::string &variable) const |
| Return an ExpressionTreeNode which represents the analytic derivative of this Operation with respect to a variable. | |
| double | evaluate (double *args, const std::map< std::string, double > &variables) const |
| Perform the computation represented by this operation. | |
| Id | getId () const |
| Get this Operation's ID. | |
| std::string | getName () const |
| Get the name of this Operation. | |
| int | getNumArguments () const |
| Get the number of arguments this operation expects. | |
| virtual bool | isInfixOperator () const |
| Get whether this operation should be displayed with infix notation. | |
| virtual bool | isSymmetric () const |
| Get whether this is a symmetric binary operation, such that exchanging its arguments does not affect the result. | |
| virtual bool | operator!= (const Operation &op) const |
| virtual bool | operator== (const Operation &op) const |
|
inherited |
This enumeration lists all Operation subclasses.
This is provided so that switch statements can be used when processing or analyzing parsed expressions.
|
inline |
|
inlinevirtual |
Create a clone of this Operation.
Implements PLMD::lepton::Operation.
|
virtual |
Return an ExpressionTreeNode which represents the analytic derivative of this Operation with respect to a variable.
| children | the child nodes |
| childDerivs | the derivatives of the child nodes with respect to the variable |
| variable | the variable with respect to which the derivate should be taken |
Implements PLMD::lepton::Operation.
|
inlinevirtual |
Perform the computation represented by this operation.
| args | the array of arguments |
| variables | a map containing the values of all variables |
Implements PLMD::lepton::Operation.
|
inlinevirtual |
Get this Operation's ID.
Implements PLMD::lepton::Operation.
|
inlinevirtual |
Get the name of this Operation.
Implements PLMD::lepton::Operation.
|
inlinevirtual |
Get the number of arguments this operation expects.
Implements PLMD::lepton::Operation.
|
inlinevirtualinherited |
Get whether this operation should be displayed with infix notation.
Reimplemented in PLMD::lepton::Operation::Add, PLMD::lepton::Operation::Divide, PLMD::lepton::Operation::Multiply, PLMD::lepton::Operation::Power, PLMD::lepton::Operation::PowerConstant, and PLMD::lepton::Operation::Subtract.
|
inlinevirtualinherited |
Get whether this is a symmetric binary operation, such that exchanging its arguments does not affect the result.
Reimplemented in PLMD::lepton::Operation::Add, and PLMD::lepton::Operation::Multiply.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Hosted by GitHub
|
1.17.0
|