libsbml.Delay.setMath C# (CSharp) Method

setMath() public method

public setMath ( ASTNode math ) : int
math ASTNode
return int
        public int setMath(ASTNode math)
        {
            int ret = libsbmlPINVOKE.Delay_setMath(swigCPtr, ASTNode.getCPtr(math));
            return ret;
        }

Usage Example

Esempio n. 1
0
 public void test_WriteSBML_Event_both()
 {
     string expected = "<event id=\"e\">\n" +
     "  <trigger>\n" +
     "    <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n" +
     "      <apply>\n" +
     "        <leq/>\n" +
     "        <ci> P1 </ci>\n" +
     "        <ci> t </ci>\n" +
     "      </apply>\n" +
     "    </math>\n" +
     "  </trigger>\n" +
     "  <delay>\n" +
     "    <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n" +
     "      <cn type=\"integer\"> 5 </cn>\n" +
     "    </math>\n" +
     "  </delay>\n" +
     "</event>";
       D.setLevelAndVersion(2,1,false);
       Event e = D.createModel().createEvent();
       e.setId("e");
       ASTNode node1 = libsbml.parseFormula("leq(P1,t)");
       Trigger t = new Trigger ( 2,1 );
       t.setMath(node1);
       ASTNode node = libsbml.parseFormula("5");
       Delay d = new Delay ( 2,1 );
       d.setMath(node);
       e.setDelay(d);
       e.setTrigger(t);
       assertEquals( true, equals(expected,e.toSBML()) );
 }
All Usage Examples Of libsbml.Delay::setMath