本文整理汇总了C#中libsbmlcs.Species类的典型用法代码示例。如果您正苦于以下问题:C# Species类的具体用法?C# Species怎么用?C# Species使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Species类属于libsbmlcs命名空间,在下文中一共展示了Species类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: test_Species_setSpatialSizeUnits4
public void test_Species_setSpatialSizeUnits4()
{
Species c = new Species(2,2);
int i = c.setSpatialSizeUnits("");
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertEquals( false, c.isSetSpatialSizeUnits() );
c = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:8,代码来源:TestSpecies_newSetters.cs
示例17: test_Species_ancestor_add
public void test_Species_ancestor_add()
{
Species ia = new Species(2,4);
Model m = new Model(2,4);
ia.setId("s");
ia.setCompartment("c");
m.addSpecies(ia);
ia = null;
ListOf lo = m.getListOfSpecies();
Species obj = m.getSpecies(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,代码行数:15,代码来源:TestAncestor.cs
示例18: test_SBMLConvert_convertToL1_Species_Concentration
public void test_SBMLConvert_convertToL1_Species_Concentration()
{
SBMLDocument d = new SBMLDocument(2,1);
Model m = d.createModel();
string sid = "C";
Compartment c = new Compartment(2,1);
Species s = new Species(2,1);
c.setId(sid);
c.setSize(1.2);
m.addCompartment(c);
s.setId( "s" );
s.setCompartment(sid);
s.setInitialConcentration(2.34);
m.addSpecies(s);
assertTrue( d.setLevelAndVersion(1,2,true) == true );
Species s1 = m.getSpecies(0);
assertTrue( s1 != null );
assertTrue(( "C" == s1.getCompartment() ));
assertTrue( m.getCompartment( "C").getSize() == 1.2 );
assertTrue( s1.getInitialConcentration() == 2.34 );
assertTrue( s1.isSetInitialConcentration() == true );
d = null;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:23,代码来源:TestSBMLConvert.cs
示例19: test_SBase_setModelHistoryL3
public void test_SBase_setModelHistoryL3()
{
SBase sb = new Species(3,1);
sb.setMetaId("_s");
ModelHistory mh = new ModelHistory();
ModelCreator mc = new ModelCreator();
Date date = new Date(2005,12,30,12,15,45,1,2,0);
mc.setFamilyName( "Keating");
mc.setGivenName( "Sarah");
mc.setEmail( "[email protected]");
mc.setOrganisation( "UH");
mh.addCreator(mc);
mh.setCreatedDate(date);
mh.setModifiedDate(date);
int i = sb.setModelHistory(mh);
assertTrue( i == libsbml.LIBSBML_OPERATION_SUCCESS );
assertTrue( sb.isSetModelHistory() == true );
mh = sb.getModelHistory();
assertTrue( mh != null );
sb.unsetModelHistory();
mh = sb.getModelHistory();
assertTrue( sb.isSetModelHistory() == false );
assertTrue( mh == null );
mh = null;
}
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:25,代码来源:TestSBase_newSetters.cs
示例20: test_Species
public void test_Species()
{
Species s = new Species(2,4);
assertEquals( true, s.hasRequiredElements() );
s = null;
}
开发者ID:TotteKarlsson,项目名称:roadrunner,代码行数:6,代码来源:TestRequiredElements.cs
注:本文中的libsbmlcs.Species类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论