Loading...
Searching...
No Matches
PLMD::lepton::Operation::Cube Class Reference

#include <Operation.h>

Inheritance diagram for PLMD::lepton::Operation::Cube:

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

 Cube ()
Operationclone () 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

Member Enumeration Documentation

◆ Id

This enumeration lists all Operation subclasses.

This is provided so that switch statements can be used when processing or analyzing parsed expressions.

Enumerator
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 

Constructor & Destructor Documentation

◆ Cube()

PLMD::lepton::Operation::Cube::Cube ( )
inline

Member Function Documentation

◆ clone()

Operation * PLMD::lepton::Operation::Cube::clone ( ) const
inlinevirtual

Create a clone of this Operation.

Implements PLMD::lepton::Operation.

◆ differentiate()

ExpressionTreeNode PLMD::Operation::Cube::differentiate ( const std::vector< ExpressionTreeNode > & children,
const std::vector< ExpressionTreeNode > & childDerivs,
const std::string & variable ) const
virtual

Return an ExpressionTreeNode which represents the analytic derivative of this Operation with respect to a variable.

Parameters
childrenthe child nodes
childDerivsthe derivatives of the child nodes with respect to the variable
variablethe variable with respect to which the derivate should be taken

Implements PLMD::lepton::Operation.

◆ evaluate()

double PLMD::lepton::Operation::Cube::evaluate ( double * args,
const std::map< std::string, double > & variables ) const
inlinevirtual

Perform the computation represented by this operation.

Parameters
argsthe array of arguments
variablesa map containing the values of all variables
Returns
the result of performing the computation.

Implements PLMD::lepton::Operation.

◆ getId()

Id PLMD::lepton::Operation::Cube::getId ( ) const
inlinevirtual

Get this Operation's ID.

Implements PLMD::lepton::Operation.

◆ getName()

std::string PLMD::lepton::Operation::Cube::getName ( ) const
inlinevirtual

Get the name of this Operation.

Implements PLMD::lepton::Operation.

◆ getNumArguments()

int PLMD::lepton::Operation::Cube::getNumArguments ( ) const
inlinevirtual

Get the number of arguments this operation expects.

Implements PLMD::lepton::Operation.

◆ isInfixOperator()

virtual bool PLMD::lepton::Operation::isInfixOperator ( ) const
inlinevirtualinherited

◆ isSymmetric()

virtual bool PLMD::lepton::Operation::isSymmetric ( ) const
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.

◆ operator!=()

◆ operator==()

virtual bool PLMD::lepton::Operation::operator== ( const Operation & op) const
inlinevirtualinherited

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