36 {
"k1*PRODUCT<substrate_i>-k2*PRODUCT<product_j>",
"k1*PRODUCT<substrate_i>"};
51 "Mass action (reversible)" :
52 "Mass action (irreversible)",
80 mValue = *(pCallParameters + 0)->value
84 mValue *= *(Factor++)->value;
92 Factor = (pCallParameters + 3)->vector->
begin();
93 End = (pCallParameters + 3)->vector->
end();
97 Products = *(pCallParameters + 2)->value
100 while (Factor != End)
101 Products *= *(Factor++)->value;
104 return mValue -= Products;
110 if (parameter == callParameters[0].value)
return true;
115 it = callParameters[1].vector->
begin();
116 end = callParameters[1].vector->
end();
118 for (; it != end; it++)
if (parameter == it->value)
return true;
122 if (parameter == callParameters[2].value)
return true;
124 it = callParameters[3].vector->
begin();
125 end = callParameters[3].vector->
end();
127 for (; it != end; it++)
if (parameter == it->value)
return true;
134 if (infix ==
"k1*PRODUCT<substrate_i>-k2*PRODUCT<product_j>")
136 else if (infix ==
"k1*PRODUCT<substrate_i>")
176 std::ostringstream out;
181 out <<
"<mfenced>" << std::endl;
183 out <<
"<mrow>" << std::endl;
185 out << variables[0][0] << std::endl;
187 size_t i, imax = variables[1].size();
189 for (i = 0; i < imax; ++i)
191 out <<
"<mo>·</mo>" << std::endl;
192 out << variables[1][i] << std::endl;
197 out <<
"<mo>-</mo>" << std::endl;
198 out << variables[2][0] << std::endl;
200 size_t i, imax = variables[3].size();
202 for (i = 0; i < imax; ++i)
204 out <<
"<mo>·</mo>" << std::endl;
205 out << variables[3][i] << std::endl;
209 out <<
"</mrow>" << std::endl;
212 out <<
"</mfenced>" << std::endl;
const_iterator begin() const
virtual const C_FLOAT64 & calcValue(const CCallParameters< C_FLOAT64 > &callParameters)
static const char * Infix[]
virtual std::string writeMathML(const std::vector< std::vector< std::string > > &variables, bool expand=true, bool fullExpand=true) const
virtual bool setInfix(const std::string &infix)
void setReversible(const TriLogic &reversible)
CMassAction(const std::string &name="NoName", const CCopasiContainer *pParent=NULL)
void add(const CFunctionParameter ¶meter)
const TriLogic & isReversible() const
virtual bool dependsOn(const C_FLOAT64 *parameter, const CCallParameters< C_FLOAT64 > &callParameters) const
The class for handling a chemical kinetic function.
const_iterator end() const
CFunctionParameters & getVariables()
#define CONSTRUCTOR_TRACE
virtual bool setInfix(const std::string &infix)