COPASI API
4.16.103
|
Go to the source code of this file.
Variables | |
std::map< std::string, const CEvaluationNode * > | str2eval |
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalFraction & | fraction | ) |
Definition at line 66 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), CNormalFraction::checkDenominatorOne(), convertToCEvaluationNode(), CEvaluationNodeOperator::DIVIDE, CNormalFraction::getDenominator(), CNormalFraction::getNumerator(), and pResult.
Referenced by convertToCEvaluationNode(), and CNormalTranslation::normAndSimplifyReptdly().
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalItem & | item | ) |
Definition at line 87 of file ConvertToCEvaluationNode.cpp.
References CEvaluationNodeConstant::_INFINITY, CEvaluationNodeConstant::_NaN, CEvaluationNodeVariable::ANY, CNormalItem::CONSTANT, CEvaluationNodeConstant::EXPONENTIALE, CEvaluationNodeConstant::FALSE, CNormalItem::getName(), CNormalItem::getType(), CEvaluationNode::INVALID, CEvaluationNodeConstant::PI, CEvaluationNodeConstant::TRUE, and CNormalItem::VARIABLE.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalItemPower & | itemPower | ) |
Definition at line 134 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), convertToCEvaluationNode(), CEvaluationNodeNumber::DOUBLE, CNormalItemPower::getExp(), CNormalItemPower::getItem(), CEvaluationNodeOperator::POWER, and pResult.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalLcm & | lcm | ) |
Definition at line 156 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), convertToCEvaluationNode(), CCopasiNode< _Data >::getChild(), CNormalLcm::getItemPowers(), CCopasiNode< _Data >::getParent(), CNormalLcm::getSums(), CEvaluationNodeOperator::MULTIPLY, pResult, and CCopasiNode< _Data >::removeChild().
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalProduct & | product | ) |
Definition at line 215 of file ConvertToCEvaluationNode.cpp.
References convertToCEvaluationNode(), CNormalTranslation::createChain(), CEvaluationNodeNumber::DOUBLE, CNormalProduct::getFactor(), CNormalProduct::getItemPowers(), CNormalTranslation::ONE_NODE, pResult, and CNormalTranslation::TIMES_NODE.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalSum & | sum | ) |
Definition at line 254 of file ConvertToCEvaluationNode.cpp.
References convertToCEvaluationNode(), CEvaluationNode::copyBranch(), CNormalTranslation::createChain(), CNormalSum::getFractions(), CNormalSum::getProducts(), CNormalTranslation::PLUS_NODE, pResult, and CNormalTranslation::ZERO_NODE.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalChoice & | choice | ) |
Definition at line 1720 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), convertToCEvaluationNode(), CNormalChoice::getCondition(), CNormalChoice::getFalseExpression(), CNormalChoice::getTrueExpression(), and CEvaluationNodeChoice::IF.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalChoiceLogical & | choice | ) |
Definition at line 1748 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), convertToCEvaluationNode(), CNormalChoiceLogical::getCondition(), CNormalChoiceLogical::getFalseExpression(), CNormalChoiceLogical::getTrueExpression(), and CEvaluationNodeChoice::IF.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalLogicalItem & | choice | ) |
Definition at line 1776 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), CEvaluationNode::compile(), convertToCEvaluationNode(), CNormalLogicalItem::EQ, CEvaluationNodeLogical::EQ, CNormalLogicalItem::FALSE, CEvaluationNodeConstant::FALSE, CNormalLogicalItem::GE, CEvaluationNodeLogical::GE, CNormalLogicalItem::getLeft(), CNormalLogicalItem::getRight(), CNormalLogicalItem::getType(), CNormalLogicalItem::GT, CEvaluationNodeLogical::GT, CNormalLogicalItem::INVALID, CNormalLogicalItem::LE, CEvaluationNodeLogical::LE, CNormalLogicalItem::LT, CEvaluationNodeLogical::LT, CNormalLogicalItem::NE, CEvaluationNodeLogical::NE, CNormalLogicalItem::TRUE, and CEvaluationNodeConstant::TRUE.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalLogical & | logical | ) |
Definition at line 1842 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), CEvaluationNodeLogical::AND, convertToCEvaluationNode(), CEvaluationNode::copyBranch(), CNormalTranslation::createChain(), CNormalLogical::getAndSets(), CNormalLogical::getChoices(), CNormalLogical::isNegated(), CNormalTranslation::NEUTRAL_ELEMENT_AND, CNormalTranslation::NEUTRAL_ELEMENT_OR, CEvaluationNodeFunction::NOT, CEvaluationNodeLogical::OR, and pResult.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalBase & | base | ) |
Definition at line 1092 of file ConvertToCEvaluationNode.cpp.
References convertToCEvaluationNode().
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalGeneralPower & | pow | ) |
Definition at line 1140 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), CNormalFraction::checkIsOne(), convertToCEvaluationNode(), CNormalGeneralPower::getLeft(), CNormalGeneralPower::getRight(), CNormalGeneralPower::getType(), CNormalGeneralPower::INVALID, CNormalGeneralPower::MODULO, CEvaluationNodeOperator::MODULUS, CNormalGeneralPower::POWER, CEvaluationNodeOperator::POWER, and pResult.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalFunction & | fun | ) |
Definition at line 1220 of file ConvertToCEvaluationNode.cpp.
References CNormalFunction::ABS, CEvaluationNodeFunction::ABS, CCopasiNode< _Data >::addChild(), CNormalFunction::ARCCOS, CEvaluationNodeFunction::ARCCOS, CNormalFunction::ARCCOSH, CEvaluationNodeFunction::ARCCOSH, CNormalFunction::ARCCOT, CEvaluationNodeFunction::ARCCOT, CNormalFunction::ARCCOTH, CEvaluationNodeFunction::ARCCOTH, CNormalFunction::ARCCSC, CEvaluationNodeFunction::ARCCSC, CNormalFunction::ARCCSCH, CEvaluationNodeFunction::ARCCSCH, CNormalFunction::ARCSEC, CEvaluationNodeFunction::ARCSEC, CNormalFunction::ARCSECH, CEvaluationNodeFunction::ARCSECH, CNormalFunction::ARCSIN, CEvaluationNodeFunction::ARCSIN, CNormalFunction::ARCSINH, CEvaluationNodeFunction::ARCSINH, CNormalFunction::ARCTAN, CEvaluationNodeFunction::ARCTAN, CNormalFunction::ARCTANH, CEvaluationNodeFunction::ARCTANH, CNormalFunction::CEIL, CEvaluationNodeFunction::CEIL, convertToCEvaluationNode(), CNormalFunction::COS, CEvaluationNodeFunction::COS, CNormalFunction::COSH, CEvaluationNodeFunction::COSH, CNormalFunction::COT, CEvaluationNodeFunction::COT, CNormalFunction::COTH, CEvaluationNodeFunction::COTH, CNormalFunction::CSC, CEvaluationNodeFunction::CSC, CNormalFunction::CSCH, CEvaluationNodeFunction::CSCH, CNormalFunction::EXP, CEvaluationNodeFunction::EXP, CNormalFunction::FACTORIAL, CEvaluationNodeFunction::FACTORIAL, CNormalFunction::FLOOR, CEvaluationNodeFunction::FLOOR, CNormalFunction::getFraction(), CNormalFunction::getType(), CEvaluationNodeFunction::INVALID, CNormalFunction::INVALID, CNormalFunction::LOG, CEvaluationNodeFunction::LOG, CNormalFunction::LOG10, CEvaluationNodeFunction::LOG10, CNormalFunction::NAMES, pResult, CNormalFunction::SEC, CEvaluationNodeFunction::SEC, CNormalFunction::SECH, CEvaluationNodeFunction::SECH, CNormalFunction::SIN, CEvaluationNodeFunction::SIN, CNormalFunction::SINH, CEvaluationNodeFunction::SINH, CNormalFunction::SQRT, CEvaluationNodeFunction::SQRT, CNormalFunction::TAN, CEvaluationNodeFunction::TAN, CNormalFunction::TANH, and CEvaluationNodeFunction::TANH.
CEvaluationNode* convertToCEvaluationNode | ( | const CNormalCall & | call | ) |
Definition at line 1175 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), convertToCEvaluationNode(), CEvaluationNodeDelay::DELAY, CNormalCall::DELAY, CNormalCall::EXPRESSION, CEvaluationNodeCall::EXPRESSION, CNormalCall::FUNCTION, CEvaluationNodeCall::FUNCTION, CNormalCall::getFractions(), CNormalCall::getName(), CNormalCall::getType(), CEvaluationNodeCall::INVALID, and CNormalCall::INVALID.
CNormalCall* createCall | ( | const CEvaluationNode * | node | ) |
Create an function call from an evaluation node.
Definition at line 1451 of file ConvertToCEvaluationNode.cpp.
References CNormalCall::add(), CEvaluationNode::CALL, createNormalRepresentation(), CNormalCall::DELAY, CEvaluationNode::DELAY, CNormalCall::EXPRESSION, CEvaluationNodeCall::EXPRESSION, CNormalCall::FUNCTION, CEvaluationNodeCall::FUNCTION, CCopasiNode< _Data >::getChild(), CCopasiNode< _Data >::getData(), CCopasiNode< _Data >::getSibling(), CEvaluationNode::getType(), CEvaluationNodeCall::INVALID, CNormalCall::INVALID, CNormalCall::setName(), CNormalCall::setType(), CEvaluationNode::subType(), and CEvaluationNode::type().
Referenced by createItemPower(), and createItemPowerItem().
CNormalChoice* createChoice | ( | const CEvaluationNode * | pNode | ) |
This version of the method is wrong. CEvaluationNode* convertToCEvaluationNode(const CNormalLogical& logical) { CEvaluationNode* pResult = NULL; bool error = false; CEvaluationNodeFunction* pNot = NULL; CNormalLogical::ItemSetOfSets::const_iterator it = logical.getAndSets().begin(), endit = logical.getAndSets().end(); std::vector<CEvaluationNode*> andItems; while (it != endit && error == false) { CEvaluationNode* pTmpResult = NULL; if ((it).first.size() == 1) { pTmpResult = convertToCEvaluationNode(*(*(*it).first.begin()).first); if ((*(*it).first.begin()).second == true) { pNot = new CEvaluationNodeFunction(CEvaluationNodeFunction::NOT, "NOT"); pNot->addChild(pTmpResult); pTmpResult = pNot; } } else if ((*it).first.size() > 1) { CNormalLogical::ItemSet::const_iterator innerit = (*it).first.begin(), innerendit = (*it).first.end(); create the not CEvaluationNode pOrNode = new CEvaluationNodeLogical(CEvaluationNodeLogical::OR, "OR"); pTmpResult = pOrNode; while (innerit != innerendit && error == false) { CEvaluationNode* pItem = convertToCEvaluationNode(*(innerit).first); if (pItem != NULL) { if ((*innerit).second == true) { pNot = new CEvaluationNodeFunction(CEvaluationNodeFunction::NOT, "NOT"); pNot->addChild(pItem); pItem = pNot; } pOrNode->addChild(pItem); pOrNode->addChild(new CEvaluationNodeLogical(CEvaluationNodeLogical::OR, "OR")); pOrNode = dynamic_cast<CEvaluationNodeLogical>(pOrNode->getChild()->getSibling()); } else { error = true; delete pTmpResult; pTmpResult = NULL; } ++innerit; } if (error == false) { replace the parent of the current pOrNode with its first child; CEvaluationNode * pGrandParent = dynamic_cast<CEvaluationNode*>(pOrNode->getParent()); pGrandParent->removeChild(pOrNode->getParent()); pOrNode = dynamic_cast<CEvaluationNode*>(pOrNode->getParent()); CEvaluationNode* pChild = dynamic_cast<CEvaluationNode*>(pOrNode->getChild()); pOrNode->removeChild(pChild); pGrandParent->addChild(pChild); delete pOrNode; } } if (pTmpResult != NULL) { if ((it).second == true) { pNot = new CEvaluationNodeFunction(CEvaluationNodeFunction::NOT, "NOT"); pNot->addChild(pTmpResult); } andItems.push_back(pTmpResult); } ++it; } CNormalLogical::ChoiceSetOfSets::const_iterator it2 = logical.getChoices().begin(), endit2 = logical.getChoices().end(); while (it2 != endit2 && error == false) { CEvaluationNode pTmpResult = NULL; if ((it2).first.size() == 1) { pTmpResult = convertToCEvaluationNode(*(*(*it2).first.begin()).first); if ((*(*it2).first.begin()).second == true) { pNot = new CEvaluationNodeFunction(CEvaluationNodeFunction::NOT, "NOT"); pNot->addChild(pTmpResult); pTmpResult = pNot; } } else if ((*it2).first.size() > 1) { CNormalLogical::ChoiceSet::const_iterator innerit = (*it2).first.begin(), innerendit = (*it2).first.end(); create the not CEvaluationNode pOrNode = new CEvaluationNodeLogical(CEvaluationNodeLogical::OR, "OR"); pTmpResult = pOrNode; while (innerit != innerendit && error != true) { CEvaluationNode* pItem = convertToCEvaluationNode(*(innerit).first); if (pItem != NULL) { if ((*innerit).second == true) { pNot = new CEvaluationNodeFunction(CEvaluationNodeFunction::NOT, "NOT"); pNot->addChild(pItem); pItem = pNot; } pOrNode->addChild(pItem); pOrNode->addChild(new CEvaluationNodeLogical(CEvaluationNodeLogical::OR, "OR")); pOrNode = dynamic_cast<CEvaluationNodeLogical>(pOrNode->getChild()->getSibling()); } else { delete pTmpResult; pTmpResult = NULL; error = true; } ++innerit; } replace the parent of the current pOrNode with its first child; if (error == false) { CEvaluationNode * pGrandParent = dynamic_cast<CEvaluationNode*>(pOrNode->getParent()); pGrandParent->removeChild(pOrNode->getParent()); pOrNode = dynamic_cast<CEvaluationNode*>(pOrNode->getParent()); CEvaluationNode* pChild = dynamic_cast<CEvaluationNode*>(pOrNode->getChild()); pOrNode->removeChild(pChild); pGrandParent->addChild(pChild); delete pOrNode; } } if (pTmpResult != NULL) { if ((it2).second == true) { pNot = new CEvaluationNodeFunction(CEvaluationNodeFunction::NOT, "NOT"); pNot->addChild(pTmpResult); } andItems.push_back(pTmpResult); } ++it2; } if (!andItems.empty()) { if (error == false) { if (andItems.size() == 1) { pResult = *andItems.begin(); } else { std::vector<CEvaluationNode>::iterator andit = andItems.begin(), andendit = andItems.end(); CEvaluationNode* pAndNode = new CEvaluationNodeLogical(CEvaluationNodeLogical::AND, "AND"); pResult = pAndNode; while (andit != andendit) { pAndNode->addChild(<em>andit); pAndNode->addChild(new CEvaluationNodeLogical(CEvaluationNodeLogical::AND, "AND")); pAndNode = dynamic_cast<CEvaluationNodeLogical>(pAndNode->getChild()->getSibling()); ++andit; } replace the parent of the current pAndNode with its first child; CEvaluationNode* pGrandParent = dynamic_cast<CEvaluationNode*>(pAndNode->getParent()); pGrandParent->removeChild(pAndNode->getParent()); pAndNode = dynamic_cast<CEvaluationNode*>(pAndNode->getParent()); CEvaluationNode* pChild = dynamic_cast<CEvaluationNode*>(pAndNode->getChild()); pAndNode->removeChild(pChild); pGrandParent->addChild(pChild); delete pAndNode; } } else { an error has occured, we need to free the memory taken by all andItems std::vector<CEvaluationNode*>::iterator andit = andItems.begin(), andendit = andItems.end(); while (andit != andendit) { delete (*andit); ++andit; } } } if (pResult != NULL) { if (logical.isNegated() == true) { pNot = new CEvaluationNodeFunction(CEvaluationNodeFunction::NOT, "NOT"); pNot->addChild(pResult); pResult = pNot; } pResult->compile(NULL); } return pResult; }
Definition at line 2245 of file ConvertToCEvaluationNode.cpp.
References CEvaluationNode::CHOICE, createLogical(), createNormalRepresentation(), CCopasiNode< _Data >::getChild(), CEvaluationNode::getType(), pResult, CNormalChoice::setCondition(), CNormalChoice::setFalseExpression(), CNormalChoice::setTrueExpression(), and CEvaluationNode::type().
Referenced by createItemPower(), and createItemPowerItem().
CNormalFraction* createFraction | ( | const CEvaluationNode * | node | ) |
Create a fraction from a node. node is necessarily a DIVIDE operator if not the root node of the tree.
Definition at line 308 of file ConvertToCEvaluationNode.cpp.
References CNormalSum::add(), CNormalFraction::cancel(), CNormalTranslation::createChain(), createSum(), CCopasiNode< _Data >::getData(), CNormalTranslation::ONE_NODE, CNormalFraction::setDenominator(), CNormalFraction::setNumerator(), CNormalTranslation::splitProduct(), and CNormalTranslation::TIMES_NODE.
Referenced by createItemPowerItem(), and createNormalRepresentation().
CNormalFunction* createFunction | ( | const CEvaluationNode * | node | ) |
Create an function from an evaluation node.
Definition at line 1503 of file ConvertToCEvaluationNode.cpp.
References CNormalFunction::ABS, CEvaluationNodeFunction::ABS, CNormalFunction::ARCCOS, CEvaluationNodeFunction::ARCCOS, CNormalFunction::ARCCOSH, CEvaluationNodeFunction::ARCCOSH, CNormalFunction::ARCCOT, CEvaluationNodeFunction::ARCCOT, CNormalFunction::ARCCOTH, CEvaluationNodeFunction::ARCCOTH, CNormalFunction::ARCCSC, CEvaluationNodeFunction::ARCCSC, CNormalFunction::ARCCSCH, CEvaluationNodeFunction::ARCCSCH, CNormalFunction::ARCSEC, CEvaluationNodeFunction::ARCSEC, CNormalFunction::ARCSECH, CEvaluationNodeFunction::ARCSECH, CNormalFunction::ARCSIN, CEvaluationNodeFunction::ARCSIN, CNormalFunction::ARCSINH, CEvaluationNodeFunction::ARCSINH, CNormalFunction::ARCTAN, CEvaluationNodeFunction::ARCTAN, CNormalFunction::ARCTANH, CEvaluationNodeFunction::ARCTANH, CNormalFunction::CEIL, CEvaluationNodeFunction::CEIL, CNormalFunction::COS, CEvaluationNodeFunction::COS, CNormalFunction::COSH, CEvaluationNodeFunction::COSH, CNormalFunction::COT, CEvaluationNodeFunction::COT, CNormalFunction::COTH, CEvaluationNodeFunction::COTH, createNormalRepresentation(), CNormalFunction::CSC, CEvaluationNodeFunction::CSC, CNormalFunction::CSCH, CEvaluationNodeFunction::CSCH, CNormalFunction::EXP, CEvaluationNodeFunction::EXP, CNormalFunction::FACTORIAL, CEvaluationNodeFunction::FACTORIAL, CNormalFunction::FLOOR, CEvaluationNodeFunction::FLOOR, CEvaluationNode::FUNCTION, CCopasiNode< _Data >::getChild(), CEvaluationNode::getType(), CEvaluationNodeFunction::INVALID, CNormalFunction::INVALID, CNormalFunction::LOG, CEvaluationNodeFunction::LOG, CNormalFunction::LOG10, CEvaluationNodeFunction::LOG10, CNormalFunction::SEC, CEvaluationNodeFunction::SEC, CNormalFunction::SECH, CEvaluationNodeFunction::SECH, CNormalFunction::setFraction(), CNormalFunction::setType(), CNormalFunction::SIN, CEvaluationNodeFunction::SIN, CNormalFunction::SINH, CEvaluationNodeFunction::SINH, CNormalFunction::SQRT, CEvaluationNodeFunction::SQRT, CEvaluationNode::subType(), CNormalFunction::TAN, CEvaluationNodeFunction::TAN, CNormalFunction::TANH, CEvaluationNodeFunction::TANH, and CEvaluationNode::type().
Referenced by createItemPower(), and createItemPowerItem().
CNormalGeneralPower* createGeneralPower | ( | const CEvaluationNode * | node | ) |
Create an general power from an evaluation node. Node MUST BE a POWER operator with second child (exponent) of type not NUMBER !!
Create an general power from an evaluation node. if it is a power node, create a for each child and set base and exponent, else only create the base from the node and set the exponent to 1
Definition at line 1378 of file ConvertToCEvaluationNode.cpp.
References createNormalRepresentation(), CEvaluationNodeNumber::DOUBLE, CCopasiNode< _Data >::getChild(), CEvaluationNode::getType(), CNormalGeneralPower::MODULO, CEvaluationNodeOperator::MODULUS, CEvaluationNode::OPERATOR, CNormalGeneralPower::POWER, CEvaluationNodeOperator::POWER, CNormalGeneralPower::setLeft(), CNormalGeneralPower::setRight(), CNormalGeneralPower::setType(), CEvaluationNode::subType(), and CEvaluationNode::type().
Referenced by createItemPower(), and createItemPowerItem().
CNormalItem* createItem | ( | const CEvaluationNode * | pNode | ) |
Create an item from an evaluation node that need not be of specific type.
Definition at line 374 of file ConvertToCEvaluationNode.cpp.
References CEvaluationNode::buildInfix(), CNormalItem::CONSTANT, CEvaluationNode::CONSTANT, CEvaluationNode::getType(), CEvaluationNode::type(), CNormalItem::VARIABLE, and CEvaluationNode::VARIABLE.
Referenced by createItemPower(), and createItemPowerItem().
CNormalItemPower* createItemPower | ( | const CEvaluationNode * | node | ) |
Create an item power from an evaluation node. Node MUST BE a POWER operator with second child (exponent) of type NUMBER !!
Create an item power from an evaluation node. Depending on the given node, we have to create different items. Either we have to create a CNormalItem, a CNormalGeneralPower, a function or a choice.
Definition at line 467 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), C_FLOAT64, CEvaluationNode::CALL, CEvaluationNode::CHOICE, CEvaluationNode::CONSTANT, createCall(), createChoice(), createFunction(), createGeneralPower(), createItem(), createItemPower(), createItemPowerItem(), CEvaluationNode::DELAY, CEvaluationNodeNumber::DOUBLE, CEvaluationNode::FUNCTION, CCopasiNode< _Data >::getChild(), CEvaluationNode::getType(), CEvaluationNode::LOGICAL, CEvaluationNodeFunction::MINUS, CEvaluationNodeOperator::MULTIPLY, CEvaluationNode::NUMBER, CEvaluationNode::OBJECT, CEvaluationNode::OPERATOR, CEvaluationNodeOperator::POWER, CNormalItemPower::setExp(), CNormalItemPower::setItem(), CEvaluationNode::subType(), CEvaluationNode::type(), and CEvaluationNode::VARIABLE.
Referenced by createItemPower(), createItemPowerItem(), and createProduct().
CNormalBase* createItemPowerItem | ( | const CEvaluationNode * | pNode | ) |
Definition at line 1660 of file ConvertToCEvaluationNode.cpp.
References CEvaluationNode::CALL, CEvaluationNode::CHOICE, CEvaluationNode::CONSTANT, createCall(), createChoice(), createFraction(), createFunction(), createGeneralPower(), createItem(), createItemPower(), createLogical(), CEvaluationNode::FUNCTION, CCopasiNode< _Data >::getChild(), CEvaluationNode::getType(), CEvaluationNode::LOGICAL, CEvaluationNodeOperator::MODULUS, CEvaluationNode::NUMBER, CEvaluationNode::OPERATOR, CEvaluationNodeOperator::POWER, pResult, CEvaluationNode::subType(), CEvaluationNode::type(), and CEvaluationNode::VARIABLE.
Referenced by createItemPower().
CNormalLogical* createLogical | ( | const CEvaluationNode * | pNode | ) |
Definition at line 2345 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), CEvaluationNodeLogical::AND, CEvaluationNode::CHOICE, CEvaluationNode::CONSTANT, CEvaluationNode::copyBranch(), CNormalLogical::copySet(), createLogical(), createLogicalChoice(), createLogicalItem(), CEvaluationNodeLogical::EQ, CEvaluationNodeConstant::FALSE, CEvaluationNode::FUNCTION, CEvaluationNodeLogical::GE, CNormalLogical::getAndSets(), CCopasiNode< _Data >::getChild(), CNormalLogical::getChoices(), CCopasiNode< _Data >::getSibling(), CEvaluationNode::getType(), CEvaluationNodeLogical::GT, CEvaluationNodeLogical::LE, CEvaluationNode::LOGICAL, CEvaluationNodeLogical::LT, CEvaluationNodeLogical::NE, CNormalLogical::negate(), CEvaluationNodeFunction::NOT, CEvaluationNodeLogical::OR, pResult, CNormalLogical::simplify(), CEvaluationNode::subType(), CEvaluationNodeConstant::TRUE, CEvaluationNode::type(), and CEvaluationNodeLogical::XOR.
Referenced by createChoice(), createItemPowerItem(), createLogical(), and createLogicalChoice().
CNormalChoiceLogical* createLogicalChoice | ( | const CEvaluationNode * | pNode | ) |
Definition at line 2295 of file ConvertToCEvaluationNode.cpp.
References CEvaluationNode::CHOICE, createLogical(), CCopasiNode< _Data >::getChild(), CEvaluationNode::getType(), pResult, CNormalChoiceLogical::setCondition(), CNormalChoiceLogical::setFalseExpression(), CNormalChoiceLogical::setTrueExpression(), and CEvaluationNode::type().
Referenced by createLogical().
CNormalLogicalItem* createLogicalItem | ( | const CEvaluationNode * | pNode | ) |
Definition at line 2582 of file ConvertToCEvaluationNode.cpp.
References CEvaluationNode::CONSTANT, createNormalRepresentation(), CNormalLogicalItem::EQ, CEvaluationNodeLogical::EQ, CNormalLogicalItem::FALSE, CEvaluationNodeConstant::FALSE, CNormalLogicalItem::GE, CEvaluationNodeLogical::GE, CCopasiNode< _Data >::getChild(), CEvaluationNode::getType(), CNormalLogicalItem::GT, CEvaluationNodeLogical::GT, CNormalLogicalItem::LE, CEvaluationNodeLogical::LE, CEvaluationNode::LOGICAL, CNormalLogicalItem::LT, CEvaluationNodeLogical::LT, CNormalLogicalItem::NE, CEvaluationNodeLogical::NE, pResult, CNormalLogicalItem::setLeft(), CNormalLogicalItem::setRight(), CNormalLogicalItem::setType(), CEvaluationNode::subType(), CNormalLogicalItem::TRUE, CEvaluationNodeConstant::TRUE, and CEvaluationNode::type().
Referenced by createLogical().
CNormalFraction* createNormalRepresentation | ( | const CEvaluationNode * | node | ) |
Create an item power from an evaluation node. Must be a CEvaluationNodeChoice.
Create an item power from an evaluation node. Must be a CEvaluationNodeChoice.
Definition at line 1038 of file ConvertToCEvaluationNode.cpp.
References CEvaluationNode::CALL, CEvaluationNode::CHOICE, CEvaluationNode::CONSTANT, CEvaluationNode::copyBranch(), createFraction(), CEvaluationNode::DELAY, CNormalTranslation::expandProducts(), CEvaluationNode::FUNCTION, CEvaluationNode::getType(), CEvaluationNode::LOGICAL, CNormalTranslation::newEvaluateNumbers(), CEvaluationNode::NUMBER, CEvaluationNode::OPERATOR, CEvaluationNode::type(), and CEvaluationNode::VARIABLE.
Referenced by create_normalform(), createCall(), createChoice(), createFunction(), createGeneralPower(), createLogicalItem(), CNormalTranslation::elementaryEliminationDivide(), CNormalTranslation::elementaryEliminationMinus(), CNormalTranslation::elementaryEliminationModulus(), CNormalTranslation::matchPowerBases(), CNormalTranslation::matchSummands(), and CNormalTranslation::normAndSimplify().
CNormalProduct* createProduct | ( | const CEvaluationNode * | node | ) |
Create a product from an evaluation node that is not necessarily a multiply operator.
Definition at line 585 of file ConvertToCEvaluationNode.cpp.
References CCopasiNode< _Data >::addChild(), CEvaluationNode::copyBranch(), CNormalTranslation::createChain(), createItemPower(), CEvaluationNodeOperator::DIVIDE, CEvaluationNode::getType(), CEvaluationNode::getValue(), CEvaluationNodeOperator::MULTIPLY, CNormalProduct::multiply(), CEvaluationNode::NUMBER, CNormalTranslation::ONE_NODE, CEvaluationNode::OPERATOR, CNormalProduct::setFactor(), CNormalTranslation::splitProduct(), CEvaluationNode::subType(), CNormalTranslation::TIMES_NODE, and CEvaluationNode::type().
Referenced by createSum().
CNormalSum* createSum | ( | const CEvaluationNode * | node | ) |
Create a sum from an evaluation node -node does not need to be a PLUS operator!
THIS CODE should be obsolete, RG (06/04/6.2008) Create a product from an evaluation node that is not necessarily a multiply operator.
Definition at line 842 of file ConvertToCEvaluationNode.cpp.
References CNormalSum::add(), createProduct(), CNormalProduct::getFactor(), CEvaluationNode::getType(), CEvaluationNodeOperator::MINUS, CEvaluationNode::OPERATOR, CEvaluationNodeOperator::PLUS, CNormalProduct::setFactor(), CNormalTranslation::splitSum(), CEvaluationNode::subType(), and CEvaluationNode::type().
Referenced by createFraction().
bool isLogical | ( | const CEvaluationNode * | pNode | ) |
Create an logical node from an evaluation node. Must be a CEvaluationNodeLogical or the not function.
Definition at line 1633 of file ConvertToCEvaluationNode.cpp.
References CEvaluationNode::CONSTANT, CEvaluationNodeConstant::FALSE, CEvaluationNode::FUNCTION, CCopasiNode< _Data >::getChild(), CCopasiNode< _Data >::getSibling(), CEvaluationNode::getType(), isLogical(), CEvaluationNode::LOGICAL, CEvaluationNodeFunction::NOT, CEvaluationNode::subType(), CEvaluationNodeConstant::TRUE, and CEvaluationNode::type().
Referenced by isLogical().
std::map<std::string, const CEvaluationNode*> str2eval |
Definition at line 64 of file ConvertToCEvaluationNode.cpp.