本文整理匯總了C#中libsbmlcs.Model.getListOfReactions方法的典型用法代碼示例。如果您正苦於以下問題:C# Model.getListOfReactions方法的具體用法?C# Model.getListOfReactions怎麽用?C# Model.getListOfReactions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類libsbmlcs.Model
的用法示例。
在下文中一共展示了Model.getListOfReactions方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: test_Reaction_parent_create
public void test_Reaction_parent_create()
{
Model m = new Model(2,4);
Reaction r = m.createReaction();
ListOf lo = m.getListOfReactions();
assertTrue( lo == m.getReaction(0).getParentSBMLObject() );
assertTrue( lo == r.getParentSBMLObject() );
assertTrue( m == lo.getParentSBMLObject() );
}
示例2: test_Reaction_parent_add
public void test_Reaction_parent_add()
{
Reaction ia = new Reaction(2,4);
Model m = new Model(2,4);
ia.setId("k");
m.addReaction(ia);
ia = null;
ListOf lo = m.getListOfReactions();
assertTrue( lo == m.getReaction(0).getParentSBMLObject() );
assertTrue( m == lo.getParentSBMLObject() );
}
示例3: test_Reaction_ancestor_create
public void test_Reaction_ancestor_create()
{
Model m = new Model(2,4);
Reaction r = m.createReaction();
ListOf lo = m.getListOfReactions();
assertTrue( r.getAncestorOfType(libsbml.SBML_MODEL) == m );
assertTrue( r.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
assertTrue( r.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
assertTrue( r.getAncestorOfType(libsbml.SBML_EVENT) == null );
Reaction obj = m.getReaction(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 );
}
示例4: test_Reaction_ancestor_add
public void test_Reaction_ancestor_add()
{
Reaction ia = new Reaction(2,4);
Model m = new Model(2,4);
ia.setId("k");
m.addReaction(ia);
ia = null;
ListOf lo = m.getListOfReactions();
Reaction obj = m.getReaction(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 );
}
示例5: test_ReadSBML_metaid_ListOf
public void test_ReadSBML_metaid_ListOf()
{
SBase sb;
string s = wrapSBML_L2v1("<listOfFunctionDefinitions metaid='lofd'/>" +
"<listOfUnitDefinitions metaid='loud'/>" +
"<listOfCompartments metaid='loc'/>" +
"<listOfSpecies metaid='los'/>" +
"<listOfParameters metaid='lop'/>" +
"<listOfRules metaid='lor'/>" +
"<listOfReactions metaid='lorx'/>" +
"<listOfEvents metaid='loe'/>");
D = libsbml.readSBMLFromString(s);
M = D.getModel();
assertTrue( M != null );
sb = M.getListOfFunctionDefinitions();
assertEquals( true, sb.isSetMetaId() );
assertTrue(( "lofd" == sb.getMetaId() ));
sb = M.getListOfUnitDefinitions();
assertEquals( true, sb.isSetMetaId() );
assertTrue(( "loud" == sb.getMetaId() ));
sb = M.getListOfCompartments();
assertEquals( true, sb.isSetMetaId() );
assertTrue(( "loc" == sb.getMetaId() ));
sb = M.getListOfSpecies();
assertEquals( true, sb.isSetMetaId() );
assertTrue(( "los" == sb.getMetaId() ));
sb = M.getListOfParameters();
assertEquals( true, sb.isSetMetaId() );
assertTrue(( "lop" == sb.getMetaId() ));
sb = M.getListOfRules();
assertEquals( true, sb.isSetMetaId() );
assertTrue(( "lor" == sb.getMetaId() ));
sb = M.getListOfReactions();
assertEquals( true, sb.isSetMetaId() );
assertTrue(( "lorx" == sb.getMetaId() ));
sb = M.getListOfEvents();
assertEquals( true, sb.isSetMetaId() );
assertTrue(( "loe" == sb.getMetaId() ));
}
示例6: test_ReadSBML_line_col_numbers
public void test_ReadSBML_line_col_numbers()
{
//setXMLParser();
SBase sb;
string s = "<?xml version='1.0' encoding='UTF-8'?>\n" +
"<sbml xmlns='http://www.sbml.org/sbml/level2' level='2' version='1'>\n" +
" <model id='testModel' name='testModel'>\n" +
" <listOfReactions> <reaction/> </listOfReactions>\n" +
" </model>\n" +
"</sbml>\n";
D = libsbml.readSBMLFromString(s);
M = D.getModel();
assertTrue( M != null );
sb = M;
sb = M.getListOfReactions();
sb = M.getReaction(0);
}