COPASI API
4.40.278
|
#include <CEvaluationNodeChoice.h>
Public Member Functions | |
virtual void | calculate () override |
CEvaluationNodeChoice (const CEvaluationNodeChoice &src) | |
CEvaluationNodeChoice (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 CIssue | setValueType (const ValueType &valueType) override |
virtual ASTNode * | toAST (const CDataModel *pDataModel) const override |
virtual | ~CEvaluationNodeChoice () |
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 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 | |
CEvaluationNodeChoice () | |
Private Attributes | |
CEvaluationNode * | mpFalseNode |
const C_FLOAT64 * | mpFalseValue |
CEvaluationNode * | mpIfNode |
const C_FLOAT64 * | mpIfValue |
CEvaluationNode * | mpTrueNode |
const C_FLOAT64 * | mpTrueValue |
This is the class for nodes presenting operators used in an evaluation trees.
|
private |
Default constructor
References CEvaluationNode::mPrecedence, and PRECEDENCE_NUMBER.
Referenced by fromAST().
Default constructor
const | SubType & subType |
const | Data & data |
References fatalError, CEvaluationNode::IF, CEvaluationNode::mPrecedence, PRECEDENCE_FUNCTION, and CEvaluationNode::subType().
CEvaluationNodeChoice::CEvaluationNodeChoice | ( | const CEvaluationNodeChoice & | src | ) |
Copy constructor
const | CEvaluationNodeChoice & src |
|
virtual |
Destructor
|
overridevirtual |
Calculate the numerical result of the node. It is assumed that all child nodes are up to date.
Reimplemented from CEvaluationNode.
References mpFalseValue, mpIfValue, mpTrueValue, and CEvaluationNode::mValue.
|
overridevirtual |
Compile a node;
const | CEvaluationTree * pTree |
Reimplemented from CEvaluationNode.
References CIssue::Error, CCopasiNode< std::string >::getChild(), CCopasiNode< _Data >::getSibling(), CEvaluationNode::getValuePointer(), CEvaluationNode::getValueType(), mpFalseNode, mpFalseValue, mpIfNode, mpIfValue, mpTrueNode, mpTrueValue, CEvaluationNode::setValueType(), CIssue::StructureInvalid, CIssue::Success, CIssue::TooManyArguments, and CEvaluationNode::Unknown.
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(), CEvaluationNodeChoice(), CEvaluationNode::IF, CEvaluationNode::INVALID, CEvaluationNode::NaN, and CEvaluationNode::subType().
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 compile().
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes in C .
Reimplemented from CEvaluationNode.
References compile().
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
References compile(), and CCopasiNode< std::string >::mData.
|
overridevirtual |
Retrieve the infix value of the node and its eventual child nodes.
Reimplemented from CEvaluationNode.
References compile(), and CCopasiNode< std::string >::mData.
|
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 compile().
|
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< CValidatedUnit > & units |
Reimplemented from CEvaluationNode.
References CValidatedUnit::merge().
|
overridevirtual |
Retrieve the display string of the node and its eventual child nodes in XPPAUT format.
Reimplemented from CEvaluationNode.
References compile().
|
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 mpFalseNode, mpIfNode, mpTrueNode, and CEvaluationNode::setUnit().
Set the type the result of the node
const | ValueType & valueType |
Reimplemented from CEvaluationNode.
References mpFalseNode, mpTrueNode, and CEvaluationNode::setValueType().
|
overridevirtual |
Create a new ASTNode corresponding to this choice node.
Reimplemented from CEvaluationNode.
References CCopasiNode< std::string >::getChild(), CCopasiNode< _Data >::getSibling(), and CEvaluationNode::toAST().
|
private |
Referenced by compile(), setUnit(), and setValueType().
|
private |
Referenced by calculate(), and compile().
|
private |
|
private |
Referenced by calculate(), and compile().
|
private |
Referenced by compile(), setUnit(), and setValueType().
|
private |
Referenced by calculate(), and compile().