COPASI API
4.40.278
|
#include <CEvaluationNodeLogical.h>
Public Member Functions | |
virtual void | calculate () override |
CEvaluationNodeLogical (const CEvaluationNodeLogical &src) | |
CEvaluationNodeLogical (const SubType &subType, const Data &data) | |
virtual CIssue | compile () override |
virtual std::string | getBerkeleyMadonnaString (const std::vector< std::string > &children) const override |
virtual std::string | getCCodeString (const std::vector< std::string > &children) const override |
virtual std::string | getDisplayString (const std::vector< std::string > &children) const override |
virtual std::string | getInfix (const std::vector< std::string > &children) const override |
virtual std::string | getMMLString (const std::vector< std::string > &children, bool expand, const std::vector< std::vector< std::string > > &variables) const override |
virtual CValidatedUnit | getUnit (const CMathContainer &container, const std::vector< CValidatedUnit > &units) const override |
virtual std::string | getXPPString (const std::vector< std::string > &children) const override |
virtual CValidatedUnit | setUnit (const CMathContainer &container, const std::map< CEvaluationNode *, CValidatedUnit > ¤tUnits, std::map< CEvaluationNode *, CValidatedUnit > &targetUnits) const override |
virtual ASTNode * | toAST (const CDataModel *pDataModel) const override |
virtual | ~CEvaluationNodeLogical () |
Public Member Functions inherited from CEvaluationNode | |
void | addChildren (const std::vector< CEvaluationNode * > &children) |
std::string | buildBerkeleyMadonnaString () const |
std::string | buildCCodeString () const |
std::string | buildDisplayString () const |
std::string | buildInfix () const |
std::string | buildMMLString (bool expand, const std::vector< std::vector< std::string > > &variables) const |
std::string | buildXPPString () const |
CEvaluationNode () | |
CEvaluationNode (const CEvaluationNode &src) | |
CEvaluationNode * | copyBranch () const |
CEvaluationNode * | copyNode (CEvaluationNode *child1, CEvaluationNode *child2) const |
CEvaluationNode * | copyNode (const std::vector< CEvaluationNode * > &children) const |
const CEvaluationNode * | findTopMinus (const std::vector< CFunctionAnalyzer::CValue > &callParameters) const |
const CEvaluationTree * | getTree () const |
const C_FLOAT64 * | getValuePointer () const |
const ValueType & | getValueType () const |
virtual bool | isBoolean () const |
const MainType & | mainType () const |
bool | operator!= (const CEvaluationNode &right) const |
bool | operator< (const CEvaluationNode &rhs) |
bool | operator< (const CEvaluationNode &right) const |
bool | operator== (const CEvaluationNode &right) const |
void | printRecursively () const |
void | printRecursively (std::ostream &os, int indent=0) const |
void | setTree (const CEvaluationTree *pTree) |
virtual CIssue | setValueType (const ValueType &valueType) |
virtual CEvaluationNode * | simplifyNode (const std::vector< CEvaluationNode * > &children) const |
CEvaluationNode * | splitBranch (const CEvaluationNode *splitnode, bool left) const |
const SubType & | subType () const |
virtual | ~CEvaluationNode () |
Public Member Functions inherited from CCopasiNode< std::string > | |
virtual bool | addChild (CCopasiNode< Data > *pChild, CCopasiNode< Data > *pAfter=NULL) |
bool | addSibling (CCopasiNode< Data > *pSibling, CCopasiNode< Data > *pAfter=NULL) |
CCopasiNode (CCopasiNode< Data > *pParent=NULL) | |
CCopasiNode (const CCopasiNode< Data > &src) | |
CCopasiNode (const Data &data, CCopasiNode< Data > *pParent=NULL) | |
bool | deleteChildren () |
CCopasiNode< Data > * | getChild () |
const CCopasiNode< Data > * | getChild () const |
CCopasiNode< Data > * | getChild (const size_t &index) |
const CCopasiNode< Data > * | getChild (const size_t &index) const |
virtual Data & | getData () |
virtual const Data & | getData () const |
CCopasiNode< Data > * | getNext () |
const CCopasiNode< Data > * | getNext () const |
CCopasiNode< Data > * | getNextNonChild () |
const CCopasiNode< Data > * | getNextNonChild () const |
size_t | getNumChildren () const |
CCopasiNode< Data > * | getParent () |
const CCopasiNode< Data > * | getParent () const |
CCopasiNode< Data > * | getSibling () |
const CCopasiNode< Data > * | getSibling () const |
virtual bool | removeChild (CCopasiNode< Data > *pChild) |
virtual bool | setData (const Data &data) |
virtual | ~CCopasiNode () |
Static Public Member Functions | |
static CEvaluationNode * | fromAST (const ASTNode *pASTNode, const std::vector< CEvaluationNode * > &children) |
Static Public Member Functions inherited from CEvaluationNode | |
static CEvaluationNode * | create (const MainType &mainType, const SubType &subType, const std::string &data) |
static bool | isKeyword (const std::string &str) |
Private Member Functions | |
CEvaluationNodeLogical () | |
Private Attributes | |
CEvaluationNode * | mpLeftNode |
const C_FLOAT64 * | mpLeftValue |
CEvaluationNode * | mpRightNode |
const C_FLOAT64 * | mpRightValue |
This is the class for nodes presenting opertors used in an evaluation trees.
|
private |
Default constructor
References CEvaluationNode::Boolean, and CEvaluationNode::mValueType.
Referenced by fromAST().
Default constructor
const | SubType & subType |
const | Data & data |
References CEvaluationNode::AND, CEvaluationNode::Boolean, CEvaluationNode::EQ, CEvaluationNode::GE, CEvaluationNode::GT, CEvaluationNode::LE, CEvaluationNode::LT, CEvaluationNode::mPrecedence, CEvaluationNode::mSubType, CEvaluationNode::mValueType, CEvaluationNode::NE, CEvaluationNode::OR, PRECEDENCE_LOGIG_AND, PRECEDENCE_LOGIG_EQ, PRECEDENCE_LOGIG_GE, PRECEDENCE_LOGIG_GT, PRECEDENCE_LOGIG_LE, PRECEDENCE_LOGIG_LT, PRECEDENCE_LOGIG_NE, PRECEDENCE_LOGIG_OR, PRECEDENCE_LOGIG_XOR, and CEvaluationNode::XOR.
CEvaluationNodeLogical::CEvaluationNodeLogical | ( | const CEvaluationNodeLogical & | src | ) |
Copy constructor
const | CEvaluationNodeLogical & src |
|
virtual |
Destructor
|
inlineoverridevirtual |
Calculate the numerical result of the node. It is assumed that all child nodes are up to date.
Reimplemented from CEvaluationNode.
References CEvaluationNode::AND, CEvaluationNode::EQ, CEvaluationNode::GE, CEvaluationNode::GT, CEvaluationNode::LE, CEvaluationNode::LT, mpLeftValue, mpRightValue, CEvaluationNode::mSubType, CEvaluationNode::mValue, CEvaluationNode::NE, CEvaluationNode::OR, and CEvaluationNode::XOR.
|
overridevirtual |
Compile a node;
const | CEvaluationTree * pTree |
Reimplemented from CEvaluationNode.
References CEvaluationNode::AND, CEvaluationNode::Boolean, CEvaluationNode::EQ, CIssue::Error, CEvaluationNode::GE, CCopasiNode< std::string >::getChild(), CCopasiNode< _Data >::getSibling(), CEvaluationNode::getValuePointer(), CEvaluationNode::getValueType(), CEvaluationNode::GT, CEvaluationNode::LE, CEvaluationNode::LT, mpLeftNode, mpLeftValue, mpRightNode, mpRightValue, CEvaluationNode::mSubType, CEvaluationNode::NE, CEvaluationNode::Number, CEvaluationNode::OR, CEvaluationNode::setValueType(), CIssue::TooManyArguments, CEvaluationNode::Unknown, CIssue::VariableNotfound, and CEvaluationNode::XOR.
Referenced by getBerkeleyMadonnaString(), getCCodeString(), getDisplayString(), getInfix(), getMMLString(), and getXPPString().
|
static |
Creates a new CEvaluationNodeCall from an ASTNode and the given children
const | ASTNode* pNode |
const | std::vector< CEvaluationNode * > & children |
References CCopasiNode< _Data >::addChild(), CEvaluationNode::AND, CEvaluationNodeLogical(), CEvaluationNode::EQ, CEvaluationNode::False, CEvaluationNode::GE, CEvaluationNode::GT, CEvaluationNode::INVALID, CEvaluationNode::LE, CEvaluationNode::LT, CEvaluationNode::NE, CEvaluationNode::OR, CEvaluationNode::subType(), CEvaluationNode::True, and CEvaluationNode::XOR.
Referenced by CEvaluationTree::fromAST().
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes in Berkeley Madonna format.
Reimplemented from CEvaluationNode.
References CEvaluationNode::AND, compile(), CEvaluationNode::EQ, CEvaluationNode::GE, CEvaluationNode::GT, CEvaluationNode::LE, CEvaluationNode::LT, mpLeftNode, mpRightNode, CEvaluationNode::NE, CEvaluationNode::OR, and CEvaluationNode::subType().
|
overridevirtual |
Retrieve the disclass ASTNode;play string of the node and its eventual child nodes in C.
Reimplemented from CEvaluationNode.
References CEvaluationNode::AND, compile(), CEvaluationNode::EQ, CEvaluationNode::GE, CEvaluationNode::GT, CEvaluationNode::LE, CEvaluationNode::LT, mpLeftNode, mpRightNode, CEvaluationNode::NE, CEvaluationNode::OR, and CEvaluationNode::subType().
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
References compile(), CCopasiNode< std::string >::mData, mpLeftNode, and mpRightNode.
|
overridevirtual |
Retrieve the infix value of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
References compile(), CCopasiNode< std::string >::mData, mpLeftNode, and mpRightNode.
|
overridevirtual |
Build the MathML string
const | std::vector< std::string > & children |
bool | expand = true |
const | std::vector< std::vector< std::string > > & variables |
Reimplemented from CEvaluationNode.
References CEvaluationNode::AND, compile(), CEvaluationNode::EQ, CEvaluationNode::GE, CEvaluationNode::GT, CEvaluationNode::LE, CEvaluationNode::LT, mpLeftNode, mpRightNode, CEvaluationNode::NE, CEvaluationNode::OR, CEvaluationNode::subType(), and CEvaluationNode::XOR.
|
overridevirtual |
Figure out the appropriate CUnit to use, based on the child nodes. This sets the default, appropriate for many cases, as Dimensionless
const | CMathContainer & container |
const | std::vector< CUnit > & units |
Reimplemented from CEvaluationNode.
References CEvaluationNode::AND, CValidatedUnit::conflict(), CBaseUnit::dimensionless, CEvaluationNode::EQ, CEvaluationNode::GE, CEvaluationNode::GT, CEvaluationNode::LE, CEvaluationNode::LT, CValidatedUnit::merge(), CEvaluationNode::mSubType, CEvaluationNode::NE, CEvaluationNode::OR, CValidatedUnit::setConflict(), and CEvaluationNode::XOR.
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes in XPPAUT format.
Reimplemented from CEvaluationNode.
References CEvaluationNode::AND, compile(), CEvaluationNode::EQ, CEvaluationNode::GE, CEvaluationNode::GT, CEvaluationNode::LE, CEvaluationNode::LT, mpLeftNode, mpRightNode, CEvaluationNode::NE, CEvaluationNode::OR, CEvaluationNode::subType(), and CCopasiMessage::WARNING.
|
overridevirtual |
Set the unit for the node and return the resulting unit. The child node units are added to the map
const | CMathContainer & container |
const | std::map < CEvaluationNode * , CValidatedUnit > & currentUnits |
std::map | < CEvaluationNode * , CValidatedUnit > & targetUnits |
Reimplemented from CEvaluationNode.
References CEvaluationNode::AND, CBaseUnit::dimensionless, CEvaluationNode::EQ, CEvaluationNode::GE, CEvaluationNode::GT, CEvaluationNode::LE, CEvaluationNode::LT, CValidatedUnit::merge(), mpLeftNode, mpRightNode, CEvaluationNode::mSubType, CEvaluationNode::NE, CEvaluationNode::OR, CEvaluationNode::setUnit(), and CEvaluationNode::XOR.
|
overridevirtual |
Create a new ASTNode corresponding to this OperatorNode.
Reimplemented from CEvaluationNode.
References CCopasiNode< _Data >::addChild(), CEvaluationNode::AND, CEvaluationNode::EQ, CEvaluationNode::GE, CCopasiNode< std::string >::getChild(), CCopasiNode< _Data >::getSibling(), CEvaluationNode::GT, CEvaluationNode::INVALID, CEvaluationNode::LE, CEvaluationNode::LT, CEvaluationNode::NE, CEvaluationNode::OR, CEvaluationNode::subType(), CEvaluationNode::toAST(), and CEvaluationNode::XOR.
|
private |
Referenced by compile(), getBerkeleyMadonnaString(), getCCodeString(), getDisplayString(), getInfix(), getMMLString(), getXPPString(), and setUnit().
|
private |
Referenced by calculate(), and compile().
|
private |
Referenced by compile(), getBerkeleyMadonnaString(), getCCodeString(), getDisplayString(), getInfix(), getMMLString(), getXPPString(), and setUnit().
|
private |
Referenced by calculate(), and compile().