libsbml.Trigger.setMath C# (CSharp) Method

setMath() public method

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

Usage Example

Beispiel #1
0
 public void test_WriteSBML_Event_full()
 {
     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" +
     "  <listOfEventAssignments>\n" +
     "    <eventAssignment variable=\"k2\" sboTerm=\"SBO:0000064\">\n" +
     "      <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n" +
     "        <cn type=\"integer\"> 0 </cn>\n" +
     "      </math>\n" +
     "    </eventAssignment>\n" +
     "  </listOfEventAssignments>\n" +
     "</event>";
       D.setLevelAndVersion(2,3,false);
       Event e = D.createModel().createEvent();
       e.setId("e");
       ASTNode node = libsbml.parseFormula("leq(P1,t)");
       Trigger t = new Trigger ( 2,3 );
       t.setMath(node);
       ASTNode math = libsbml.parseFormula("0");
       EventAssignment ea = new EventAssignment ( 2,3 );
       ea.setVariable("k2");
       ea.setMath(math);
       ea.setSBOTerm(64);
       e.setTrigger(t);
       e.addEventAssignment(ea);
       assertEquals( true, equals(expected,e.toSBML()) );
 }
All Usage Examples Of libsbml.Trigger::setMath