本文整理匯總了C#中libsbml.Model.addSpeciesType方法的典型用法代碼示例。如果您正苦於以下問題:C# Model.addSpeciesType方法的具體用法?C# Model.addSpeciesType怎麽用?C# Model.addSpeciesType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類libsbml.Model
的用法示例。
在下文中一共展示了Model.addSpeciesType方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: test_Model_addSpeciesType4
public void test_Model_addSpeciesType4()
{
Model m = new Model(2,2);
SpeciesType st = new SpeciesType(2,2);
st.setId( "st");
SpeciesType st1 = new SpeciesType(2,2);
st1.setId( "st");
int i = m.addSpeciesType(st);
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue( m.getNumSpeciesTypes() == 1 );
i = m.addSpeciesType(st1);
assertTrue( i == libsbml.LIBSBML_DUPLICATE_OBJECT_ID );
assertTrue( m.getNumSpeciesTypes() == 1 );
st = null;
st1 = null;
m = null;
}
示例2: test_Model_addSpeciesType3
public void test_Model_addSpeciesType3()
{
Model m = new Model(2,2);
SpeciesType st = null;
int i = m.addSpeciesType(st);
assertTrue( i == libsbml.LIBSBML_OPERATION_FAILED );
assertTrue( m.getNumSpeciesTypes() == 0 );
m = null;
}
示例3: test_SpeciesType_parent_add
public void test_SpeciesType_parent_add()
{
SpeciesType ia = new SpeciesType(2,4);
ia.setId("s");
Model m = new Model(2,4);
m.addSpeciesType(ia);
ia = null;
ListOf lo = m.getListOfSpeciesTypes();
assertTrue( lo == m.getSpeciesType(0).getParentSBMLObject() );
assertTrue( m == lo.getParentSBMLObject() );
}
示例4: test_Model_addSpeciesType2
public void test_Model_addSpeciesType2()
{
Model m = new Model(2,2);
SpeciesType st = new SpeciesType(2,3);
st.setId( "st");
int i = m.addSpeciesType(st);
assertTrue( i == libsbml.LIBSBML_VERSION_MISMATCH );
assertTrue( m.getNumSpeciesTypes() == 0 );
st = null;
m = null;
}
示例5: test_SpeciesType_ancestor_add
public void test_SpeciesType_ancestor_add()
{
SpeciesType ia = new SpeciesType(2,4);
Model m = new Model(2,4);
ia.setId("s");
m.addSpeciesType(ia);
ia = null;
ListOf lo = m.getListOfSpeciesTypes();
SpeciesType obj = m.getSpeciesType(0);
assertTrue( obj.getAncestorOfType(libsbml.SBML_MODEL) == m );
assertTrue( obj.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
assertTrue( obj.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
assertTrue( obj.getAncestorOfType(libsbml.SBML_EVENT) == null );
}