本文整理汇总了C++中KineticLaw::getNumLocalParameters方法的典型用法代码示例。如果您正苦于以下问题:C++ KineticLaw::getNumLocalParameters方法的具体用法?C++ KineticLaw::getNumLocalParameters怎么用?C++ KineticLaw::getNumLocalParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KineticLaw
的用法示例。
在下文中一共展示了KineticLaw::getNumLocalParameters方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createCompartment
/* convert from L1 to L3 */
void
Model::convertL3ToL1 ()
{
//
// Level 3 allows a model to be specified without a Compartment. However
// this is not valid in Level 1. Thus if a L3 model has no Compartment
// one must be included
//
if (getNumCompartments() == 0)
{
createCompartment()->setId(ASSIGNED_COMPARTMENT);
}
dealWithModelUnits();
dealWithAssigningL1Stoichiometry(*this, false);
for (unsigned int i = 0; i < getNumReactions(); i++)
{
Reaction *r = getReaction(i);
if (r->isSetKineticLaw())
{
KineticLaw *kl = r->getKineticLaw();
for (unsigned int j = 0; j < kl->getNumLocalParameters(); j++)
{
Parameter *lp = new Parameter(getLevel(), getVersion());
(*lp) = *(kl->getLocalParameter(j));
kl->addParameter(lp);
}
}
}
}
示例2: dealWithModelUnits
/* convert from L1 to L3 */
void
Model::convertL3ToL2 (bool strict)
{
dealWithModelUnits();
dealWithStoichiometry();
dealWithEvents(strict);
for (unsigned int i = 0; i < getNumReactions(); i++)
{
Reaction *r = getReaction(i);
if (r->isSetKineticLaw())
{
KineticLaw *kl = r->getKineticLaw();
for (unsigned int j = 0; j < kl->getNumLocalParameters(); j++)
{
Parameter *lp = new Parameter(getLevel(), getVersion());
(*lp) = *(kl->getLocalParameter(j));
kl->addParameter(lp);
}
}
}
}