public double Evaluate(IEvaluatable node, int a, int b)
        {
            _Parameters["a"] = a;
            _Parameters["b"] = b;

            return node.Evaluate(_Parameters);
        }
示例#2
0
 public T Evaluate(params T[] args)
 {
     return(_func.Evaluate(args));
 }
示例#3
0
 public T Evaluate(IDictionary <string, T> values) => Process(_item.Evaluate(values));
示例#4
0
 public T Evaluate(IDictionary <string, T> values)
 {
     return(Process(_first.Evaluate(values), _second.Evaluate(values)));
 }
示例#5
0
 public T Evaluate(IDictionary <string, T> values)
 {
     return(_first == null && _rightParam != null
         ? _rightParam(_second.Evaluate())
         : Process(_first.Evaluate(values), _second.Evaluate(values)));
 }
示例#6
0
        private static void HandleDefaultOperatorBehaviour(Stack <double> output, IEvaluatable <double> op)
        {
            var arguments = OutputHelper.GetArgumentList(op.InputArgs, output);

            output.Push(op.Evaluate(arguments));
        }
示例#7
0
        private static void HandleSpecialUnaryOperator(Stack <double> output, IEvaluatable <double> op)
        {
            var arguments = OutputHelper.GetArgumentList(1, output);

            output.Push(op.Evaluate(arguments));
        }