本文整理汇总了C#中libsbmlcs.Species.setInitialAmount方法的典型用法代码示例。如果您正苦于以下问题:C# Species.setInitialAmount方法的具体用法?C# Species.setInitialAmount怎么用?C# Species.setInitialAmount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类libsbmlcs.Species
的用法示例。
在下文中一共展示了Species.setInitialAmount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: test_SBMLConvert_convertToL1_Species_Amount
public void test_SBMLConvert_convertToL1_Species_Amount()
{
SBMLDocument d = new SBMLDocument(2,4);
Model m = d.createModel();
string sid = "C";
Compartment c = new Compartment(2,4);
Species s = new Species(2,4);
c.setId(sid);
m.addCompartment(c);
s.setCompartment(sid);
s.setInitialAmount(2.34);
m.addSpecies(s);
assertTrue( d.setLevelAndVersion(1,2,true) == true );
assertTrue( s.getInitialAmount() == 2.34 );
d = null;
}
示例2: test_Species_setInitialAmount2
public void test_Species_setInitialAmount2()
{
Species c = new Species(2,2);
int i = c.setInitialAmount(4);
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue( c.getInitialAmount() == 4.0 );
assertEquals( true, c.isSetInitialAmount() );
i = c.unsetInitialAmount();
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertEquals( false, c.isSetInitialAmount() );
c = null;
}
示例3: test_Species_L1
public void test_Species_L1()
{
Species s = new Species(1,2);
assertEquals( false, (s.hasRequiredAttributes()) );
s.setId("s");
assertEquals( false, (s.hasRequiredAttributes()) );
s.setCompartment("c");
assertEquals( false, (s.hasRequiredAttributes()) );
s.setInitialAmount(2);
assertEquals( true, s.hasRequiredAttributes() );
s = null;
}