Beispiel #1
0
 public Binary(Op op, string symbol = "")
 {
     _op = op;
     Left = new Lambda();
     Right = new Lambda();
     if (symbol == "") {
         StringBuilder sb = new StringBuilder();
         sb.Append('[').Append(_opCount.ToString()).Append(']');
         _symbol = sb.ToString();
         _opCount++;
     }
     else {
         _symbol = symbol;
     }
 }
Beispiel #2
0
 public Unary(Function f, string name = "")
 {
     _f = f;
     Inner = new Lambda();
     if (name == "") {
         _name = "f" + _fCount.ToString();
         _fCount++;
     }
     else {
         _name = name;
     }
 }