本文整理匯總了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;
}