Пример #1
0
 private MathTree joinTrees(InnerNode op, LeafNode leaf1, MathTree subtree1)
 {
     MathNode root1 = subtree1.root;
     MathTree math = new MathTree(op, root1, leaf1);
     return math;
 }
Пример #2
0
 private MathTree joinTrees(InnerNode op, LeafNode leaf1)
 {
     MathTree math = new MathTree(op, leaf1);
     return math;
 }
Пример #3
0
        public void MathCsymbolElement(Hashtable attrs)
        {
            // look for definitionUrl
            // should be either Time or Delay
            // add to current Node
            String url = null;
            CSymbol symbol;

            if (attrs.ContainsKey("definitionUrl"))
                url = (String)attrs["definitionUrl"];

            if (url == "http://www.sbml.org/sbml/symbols/delay")
            {
                symbol = CSymbol.Delay;
            }
            else
            {
                symbol = CSymbol.Time;
            }

            MathTree mathElement = (MathTree)elementStack.Peek();
            InnerNode currentNode = (InnerNode)mathElement.getCurrentNode();

            LeafNode leaf = new LeafNode();
            leaf.AddData(symbol);
            currentNode.AddNode(leaf);
        }