COPASI API
4.16.103
|
#include <CNodeK.h>
Public Member Functions | |
void | cleanup () |
CNodeK () | |
CNodeK (const CNodeK &src) | |
CNodeK (char type, char subtype) | |
CNodeK (const std::string &name) | |
CNodeK (C_FLOAT64 constant) | |
C_FLOAT64 | getConstant () const |
std::string | getExplicitFunctionString (const std::vector< std::vector< std::string > > &callParameterNames, const std::string &r) |
C_INT32 | getIndex () const |
CNodeK & | getLeft () const |
std::string | getName () const |
CNodeK & | getRight () const |
char | getSubtype () const |
char | getType () const |
C_INT16 | isIdentifier () const |
C_INT16 | isLeftValid () const |
C_INT16 | isNumber () const |
C_INT16 | isOperator () const |
C_INT16 | isRightValid () const |
C_INT16 | leftPrecedence () const |
C_INT32 | load (CReadConfig &configbuffer) |
C_INT16 | rightPrecedence () const |
void | setConstant (C_FLOAT64 &constant) |
void | setIndex (C_INT32 index) |
void | setLeft (CNodeK &left) |
void | setLeft (CNodeK *pleft) |
void | setName (const std::string &name) |
void | setOldIndex (C_INT32 oldindex) |
void | setRight (CNodeK &right) |
void | setRight (CNodeK *pright) |
void | setSubtype (const char subtype) |
void | setType (const char ype) |
C_FLOAT64 | value (const CCallParameters< C_FLOAT64 > &callParameters) const |
void | writeMathML (std::ostream &out, C_INT32 level) const |
~CNodeK () | |
Private Attributes | |
int | attribute1 |
C_FLOAT64 | mConstant |
std::string | mExplicitFunction |
C_INT32 | mIndex |
CNodeK * | mLeft |
std::string | mName |
C_INT32 | mOldIndex |
CNodeK * | mRight |
char | mSubtype |
char | mType |
CNodeK::CNodeK | ( | ) |
CNodeK::CNodeK | ( | const CNodeK & | src | ) |
CNodeK::CNodeK | ( | char | type, |
char | subtype | ||
) |
Constructor for operator
const char | type |
const char | subtype |
Definition at line 56 of file CNodeK.cpp.
References CONSTRUCTOR_TRACE, mConstant, mIndex, mLeft, mOldIndex, mRight, mSubtype, and mType.
CNodeK::CNodeK | ( | const std::string & | name | ) |
Constructor for identifier
const string | &name |
Definition at line 68 of file CNodeK.cpp.
References CONSTRUCTOR_TRACE, mConstant, mIndex, mLeft, mName, mOldIndex, mRight, mSubtype, mType, N_IDENTIFIER, and N_NOP.
CNodeK::CNodeK | ( | C_FLOAT64 | constant | ) |
CNodeK::~CNodeK | ( | ) |
void CNodeK::cleanup | ( | ) |
C_FLOAT64 CNodeK::getConstant | ( | ) | const |
Retrieving value of a node
Definition at line 375 of file CNodeK.cpp.
References mConstant.
std::string CNodeK::getExplicitFunctionString | ( | const std::vector< std::vector< std::string > > & | callParameterNames, |
const std::string & | r | ||
) |
Returns a string that contains the equation defined from this node downwards. The function contains explicit names of node identifiers, rather than the abstract symbol.
const CCallParameters & | callParameterNames a vector of string pointers with identifier names |
const string & | r a suffix for parameter names (usually reaction number) |
C_INT32 CNodeK::getIndex | ( | ) | const |
Retrieving index the name of a node
Definition at line 380 of file CNodeK.cpp.
References mIndex.
CNodeK & CNodeK::getLeft | ( | ) | const |
Retrieving mLeft the left branch of a node
Definition at line 340 of file CNodeK.cpp.
References fatalError, and mLeft.
std::string CNodeK::getName | ( | ) | const |
Retrieving mName the name of a node
Definition at line 356 of file CNodeK.cpp.
References C_INT, isIdentifier(), and mName.
CNodeK & CNodeK::getRight | ( | ) | const |
Retrieving mName the name of a node
Definition at line 348 of file CNodeK.cpp.
References fatalError, and mRight.
char CNodeK::getSubtype | ( | ) | const |
Retrieving mSubtype the subtype of a node
Definition at line 335 of file CNodeK.cpp.
References mSubtype.
char CNodeK::getType | ( | ) | const |
Retrieving mType the type of a node
Definition at line 330 of file CNodeK.cpp.
References mType.
C_INT16 CNodeK::isIdentifier | ( | ) | const |
This checks whether the node is an identifier (mType = N_IDENTIFIER)
Definition at line 450 of file CNodeK.cpp.
References mType, N_IDENTIFIER, N_KCONSTANT, N_MODIFIER, N_OBJECT, N_PRODUCT, N_SUBSTRATE, and N_VOLUME.
Referenced by getName().
C_INT16 CNodeK::isLeftValid | ( | ) | const |
This checks whether mLeft points to a valid CNodeK
Definition at line 435 of file CNodeK.cpp.
References mLeft.
C_INT16 CNodeK::isNumber | ( | ) | const |
This checks whether the node is a number (mType = N_NUMBER)
Definition at line 445 of file CNodeK.cpp.
References mType, and N_NUMBER.
C_INT16 CNodeK::isOperator | ( | ) | const |
This checks whether the node is a operator (mType = N_OPERATOR)
Definition at line 467 of file CNodeK.cpp.
References mType, and N_OPERATOR.
C_INT16 CNodeK::isRightValid | ( | ) | const |
This checks whether mRight points to a valid CNodeK
Definition at line 440 of file CNodeK.cpp.
References mRight.
C_INT16 CNodeK::leftPrecedence | ( | ) | const |
This returns the left precedence value of a node
Definition at line 472 of file CNodeK.cpp.
References mSubtype, mType, N_FUNCTION, N_IDENTIFIER, N_NUMBER, and N_OBJECT.
C_INT32 CNodeK::load | ( | CReadConfig & | configbuffer | ) |
Loads an object with data coming from a CReadConfig object. (CReadConfig object reads an input stream)
pconfigbuffer | reference to a CReadConfig object. |
Definition at line 101 of file CNodeK.cpp.
References C_INT32, CReadConfig::getVariable(), mConstant, mIndex, mName, mSubtype, mType, N_IDENTIFIER, N_KCONSTANT, N_MODIFIER, N_NUMBER, N_PRODUCT, N_SUBSTRATE, and CReadConfig::SEARCH.
C_INT16 CNodeK::rightPrecedence | ( | ) | const |
This returns the right precedence value of a node
Definition at line 504 of file CNodeK.cpp.
References mSubtype, mType, N_FUNCTION, N_IDENTIFIER, N_NUMBER, and N_OBJECT.
Setting the value of a number
C_FLOAT64 | &constant |
Definition at line 420 of file CNodeK.cpp.
References mConstant.
Setting the index of an identifier
C_INT32 | &index |
Definition at line 425 of file CNodeK.cpp.
References mIndex.
Setting mLeft the pointer to the left branch
CNodeK | &left |
Definition at line 395 of file CNodeK.cpp.
References mLeft.
Setting mLeft the pointer to the left branch
CNodeK | *pleft |
Definition at line 400 of file CNodeK.cpp.
References mLeft.
void CNodeK::setName | ( | const std::string & | name | ) |
Setting mName the name of an identifier
const string | &name |
Definition at line 415 of file CNodeK.cpp.
References mName.
Setting the old index (Gepasi format, each type is indexed separately)
C_INT32 | &index |
Definition at line 430 of file CNodeK.cpp.
References mOldIndex.
Setting mRight the pointer to the right branch
CNodeK | &right |
Definition at line 405 of file CNodeK.cpp.
References mRight.
Setting mRight the pointer to the right branch
CNodeK | *pright |
Definition at line 410 of file CNodeK.cpp.
References mRight.
void CNodeK::setSubtype | ( | const char | subtype | ) |
Setting mSubtype the subtype of a node
const char | subtype |
Definition at line 390 of file CNodeK.cpp.
References mSubtype.
void CNodeK::setType | ( | const char | ype | ) |
Setting mType the subtype of a node
const char | type |
Definition at line 385 of file CNodeK.cpp.
References mType.
C_FLOAT64 CNodeK::value | ( | const CCallParameters< C_FLOAT64 > & | callParameters | ) | const |
This calculates the value of this sub-tree (ie with this node as root)
const | CCallParameters<C_FLOAT64> & callParameters |
|
private |
|
private |
The value of a node of type N_NUMBER
Definition at line 117 of file CNodeK.h.
Referenced by CNodeK(), getConstant(), load(), and setConstant().
|
private |
|
private |
The index of the node for type N_IDENTIFIER
Definition at line 127 of file CNodeK.h.
Referenced by CNodeK(), getIndex(), load(), and setIndex().
|
private |
|
private |
|
private |
The index in old Gepasi format
Definition at line 132 of file CNodeK.h.
Referenced by CNodeK(), and setOldIndex().
|
private |
The right branch of the tree originating from tyhis node
Definition at line 112 of file CNodeK.h.
Referenced by CNodeK(), getRight(), isRightValid(), and setRight().
|
private |
The subtype of a node. for type N_FUNCTION one of: N_LOG10, N_LOG, N_EXP, N_SIN, N_COS, N_RND, N_GAUSS, N_BOLTZ for type N_IDENTIFIER one of:N_SUBSTRATE, N_PRODUCT, N_MODIFIER, N_KCONSTANT for type N_OPERATOR one of: + - * / ^ () ...
Definition at line 102 of file CNodeK.h.
Referenced by CNodeK(), getSubtype(), leftPrecedence(), load(), rightPrecedence(), and setSubtype().
|
private |
The type of the node. One of N_ROOT, N_OPERATOR, N_IDENTIFIER, N_FUNCTION, N_NUMBER
Definition at line 92 of file CNodeK.h.
Referenced by CNodeK(), getType(), isIdentifier(), isNumber(), isOperator(), leftPrecedence(), load(), rightPrecedence(), and setType().