当前位置: 首页>>代码示例>>C#>>正文


C# Model.addReaction方法代码示例

本文整理汇总了C#中libsbmlcs.Model.addReaction方法的典型用法代码示例。如果您正苦于以下问题:C# Model.addReaction方法的具体用法?C# Model.addReaction怎么用?C# Model.addReaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在libsbmlcs.Model的用法示例。


在下文中一共展示了Model.addReaction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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() );
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:11,代码来源:TestSBMLParentObject.cs

示例2: 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 );
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:14,代码来源:TestAncestor.cs

示例3: test_Model_addReaction5

 public void test_Model_addReaction5()
 {
     Model m = new  Model(2,2);
       Reaction r = new  Reaction(2,2);
       r.setId( "r");
       Reaction r1 = new  Reaction(2,2);
       r1.setId( "r");
       int i = m.addReaction(r);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( m.getNumReactions() == 1 );
       i = m.addReaction(r1);
       assertTrue( i == libsbml.LIBSBML_DUPLICATE_OBJECT_ID );
       assertTrue( m.getNumReactions() == 1 );
       r = null;
       r1 = null;
       m = null;
 }
开发者ID:,项目名称:,代码行数:17,代码来源:

示例4: test_Model_addReaction4

 public void test_Model_addReaction4()
 {
     Model m = new  Model(2,2);
       Reaction r = null;
       int i = m.addReaction(r);
       assertTrue( i == libsbml.LIBSBML_OPERATION_FAILED );
       assertTrue( m.getNumReactions() == 0 );
       m = null;
 }
开发者ID:,项目名称:,代码行数:9,代码来源:

示例5: test_Model_addReaction3

 public void test_Model_addReaction3()
 {
     Model m = new  Model(2,2);
       Reaction r = new  Reaction(1,2);
       r.setId( "r");
       int i = m.addReaction(r);
       assertTrue( i == libsbml.LIBSBML_LEVEL_MISMATCH );
       assertTrue( m.getNumReactions() == 0 );
       r = null;
       m = null;
 }
开发者ID:,项目名称:,代码行数:11,代码来源:

示例6: test_Model_addReaction1

 public void test_Model_addReaction1()
 {
     Model m = new  Model(2,2);
       Reaction r = new  Reaction(2,2);
       int i = m.addReaction(r);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       r.setId( "r");
       i = m.addReaction(r);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( m.getNumReactions() == 1 );
       r = null;
       m = null;
 }
开发者ID:,项目名称:,代码行数:13,代码来源:


注:本文中的libsbmlcs.Model.addReaction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。