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


C# libsbmlcs.Species类代码示例

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


Species类属于libsbmlcs命名空间,在下文中一共展示了Species类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: setUp

 public void setUp()
 {
     C = new  Species(1,2);
       if (C == null);
       {
       }
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:7,代码来源:TestSpecies_newSetters.cs

示例2: test_ListOf_clear

 public void test_ListOf_clear()
 {
     ListOf lo = new  ListOf(2,4);
       SBase sp = new  Species(2,4);
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       assertTrue( lo.size() == 5 );
       lo.clear(true);
       assertTrue( lo.size() == 0 );
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       lo.append(sp);
       lo.appendAndOwn(sp);
       assertTrue( lo.size() == 5 );
       SBase elem;
       elem = lo.get(0);
       elem = null;
       elem = lo.get(1);
       elem = null;
       elem = lo.get(2);
       elem = null;
       elem = lo.get(3);
       elem = null;
       elem = lo.get(4);
       elem = null;
       lo.clear(false);
       assertTrue( lo.size() == 0 );
       lo = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:33,代码来源:TestListOf.cs

示例3: setUp

 public void setUp()
 {
     S = new  Species(3,1);
       if (S == null);
       {
       }
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:7,代码来源:TestL3Species.cs

示例4: test_Species_setCharge2

 public void test_Species_setCharge2()
 {
     Species c = new  Species(2,2);
       int i = c.setCharge(4);
       assertTrue( i == libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE );
       assertEquals( false, c.isSetCharge() );
       c = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:8,代码来源:TestSpecies_newSetters.cs

示例5: test_ListOf_append

 public void test_ListOf_append()
 {
     Model m = new  Model(2,4);
       m.createCompartment();
       ListOf loc = m.getListOfCompartments();
       assertTrue( loc.size() == 1 );
       SBase c = new  Compartment(2,4);
       int i = loc.append(c);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( loc.size() == 2 );
       SBase sp = new  Species(2,4);
       i = loc.append(sp);
       assertTrue( i == libsbml.LIBSBML_INVALID_OBJECT );
       assertTrue( loc.size() == 2 );
       m = null;
       sp = null;
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:17,代码来源:TestListOf.cs

示例6: Species

 /**
    * Copy constructor; creates a copy of this Species object.
    *
    * @param orig the object to copy.
    *
    * @throws @if python ValueError @else SBMLConstructorException @endif
    * Thrown if the argument @p orig is @c null.
    */
 public Species(Species orig)
     : this(libsbmlPINVOKE.new_Species__SWIG_2(Species.getCPtr(orig)), true)
 {
     if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
 }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:13,代码来源:Species.cs

示例7: getCPtrAndDisown

        internal static HandleRef getCPtrAndDisown(Species obj)
        {
            HandleRef ptr = new HandleRef(null, IntPtr.Zero);

            if (obj != null)
            {
            ptr             = obj.swigCPtr;
            obj.swigCMemOwn = false;
            }

            return ptr;
        }
开发者ID:0u812,项目名称:roadrunner-backup,代码行数:12,代码来源:Species.cs

示例8: test_Species_setName2

 public void test_Species_setName2()
 {
     Species c = new  Species(2,2);
       int i = c.setName( "1cell");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( true, c.isSetName() );
       i = c.unsetName();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetName() );
       c = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:11,代码来源:TestSpecies_newSetters.cs

示例9: test_Species_parent_add

 public void test_Species_parent_add()
 {
     Species ia = new Species(2,4);
       ia.setId("s");
       ia.setCompartment("c");
       Model m = new Model(2,4);
       m.addSpecies(ia);
       ia = null;
       ListOf lo = m.getListOfSpecies();
       assertTrue( lo == m.getSpecies(0).getParentSBMLObject() );
       assertTrue( m == lo.getParentSBMLObject() );
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:12,代码来源:TestSBMLParentObject.cs

示例10: test_SBase_setModelHistory

 public void test_SBase_setModelHistory()
 {
     SBase sb = new Species(2,4);
       ModelHistory mh = new  ModelHistory();
       int i = sb.setModelHistory(mh);
       assertTrue( i == libsbml.LIBSBML_UNEXPECTED_ATTRIBUTE );
       mh = null;
 }
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:8,代码来源:TestSBase_newSetters.cs

示例11: test_Species_setHasOnlySubstanceUnits2

 public void test_Species_setHasOnlySubstanceUnits2()
 {
     Species c = new  Species(2,2);
       int i = c.setHasOnlySubstanceUnits(false);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( c.getHasOnlySubstanceUnits() == false );
       i = c.setHasOnlySubstanceUnits(true);
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue( c.getHasOnlySubstanceUnits() == true );
       c = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:11,代码来源:TestSpecies_newSetters.cs

示例12: test_Species_setSubstanceUnits4

 public void test_Species_setSubstanceUnits4()
 {
     Species c = new  Species(2,2);
       int i = c.setSubstanceUnits( "mole");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertTrue((  "mole" == c.getSubstanceUnits() ));
       assertEquals( true, c.isSetSubstanceUnits() );
       i = c.setSubstanceUnits("");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetSubstanceUnits() );
       c = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:12,代码来源:TestSpecies_newSetters.cs

示例13: test_Species_setSubstanceUnits2

 public void test_Species_setSubstanceUnits2()
 {
     Species c = new  Species(2,2);
       int i = c.setSubstanceUnits( "1cell");
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertEquals( false, c.isSetSubstanceUnits() );
       c = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:8,代码来源:TestSpecies_newSetters.cs

示例14: test_Species_setSpeciesType4

 public void test_Species_setSpeciesType4()
 {
     Species c = new  Species(2,2);
       int i = c.setSpeciesType( "cell");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( true, c.isSetSpeciesType() );
       assertTrue((  "cell"  == c.getSpeciesType() ));
       i = c.setSpeciesType("");
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetSpeciesType() );
       c = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:12,代码来源:TestSpecies_newSetters.cs

示例15: test_Species_setSpeciesType2

 public void test_Species_setSpeciesType2()
 {
     Species c = new  Species(2,2);
       int i = c.setSpeciesType( "1cell");
       assertTrue( i == libsbml.LIBSBML_INVALID_ATTRIBUTE_VALUE );
       assertEquals( false, c.isSetSpeciesType() );
       i = c.unsetSpeciesType();
       assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
       assertEquals( false, c.isSetSpeciesType() );
       c = null;
 }
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:11,代码来源:TestSpecies_newSetters.cs


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