getListOfInitialAssignments() 공개 메소드

public getListOfInitialAssignments ( ) : ListOfInitialAssignments
리턴 ListOfInitialAssignments
예제 #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="aSBMLmodel"></param>
 /// <returns></returns>
 public static List<InitialAssignmentStruct> getInitialAssignments(Model aSBMLmodel)
 {
     List<InitialAssignmentStruct> list = new List<InitialAssignmentStruct>();
     ListOfInitialAssignments initList = aSBMLmodel.getListOfInitialAssignments();
     for (int i = 0; i < initList.size(); i++)
     {
         InitialAssignment init = initList.get(i);
         string symbol = init.getSymbol();
         ASTNode math = init.getMath();
     }
     return list;
 }
예제 #2
0
 public void test_InitialAssignment_parent_create()
 {
     Model m = new Model(2,4);
       InitialAssignment ia = m.createInitialAssignment();
       ListOf lo = m.getListOfInitialAssignments();
       assertTrue( lo == m.getInitialAssignment(0).getParentSBMLObject() );
       assertTrue( lo == ia.getParentSBMLObject() );
       assertTrue( m == lo.getParentSBMLObject() );
 }
예제 #3
0
 public void test_InitialAssignment_ancestor_create()
 {
     Model m = new Model(2,4);
       InitialAssignment ia = m.createInitialAssignment();
       ListOf lo = m.getListOfInitialAssignments();
       assertTrue( ia.getAncestorOfType(libsbml.SBML_MODEL) == m );
       assertTrue( ia.getAncestorOfType(libsbml.SBML_LIST_OF) == lo );
       assertTrue( ia.getAncestorOfType(libsbml.SBML_DOCUMENT) == null );
       assertTrue( ia.getAncestorOfType(libsbml.SBML_EVENT) == null );
       InitialAssignment obj = m.getInitialAssignment(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
0
 public void test_InitialAssignment_parent_add()
 {
     InitialAssignment ia = new InitialAssignment(2,4);
       Model m = new Model(2,4);
       ia.setSymbol("c");
       ia.setMath(libsbml.parseFormula("9"));
       m.addInitialAssignment(ia);
       ia = null;
       ListOf lo = m.getListOfInitialAssignments();
       assertTrue( lo == m.getInitialAssignment(0).getParentSBMLObject() );
       assertTrue( m == lo.getParentSBMLObject() );
 }
예제 #5
0
 public void test_InitialAssignment_ancestor_add()
 {
     InitialAssignment ia = new InitialAssignment(2,4);
       Model m = new Model(2,4);
       ia.setSymbol("c");
       ia.setMath(libsbml.parseFormula("9"));
       m.addInitialAssignment(ia);
       ia = null;
       ListOf lo = m.getListOfInitialAssignments();
       InitialAssignment obj = m.getInitialAssignment(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 );
 }