getInitialAssignment() public method

public getInitialAssignment ( long n ) : InitialAssignment
n long
return InitialAssignment
 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() );
 }
Esempio n. 2
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 );
 }
 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() );
 }
Esempio n. 4
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 );
 }