Exemplo n.º 1
0
        public override double Evaluate(VariableReplacements replacements)
        {
            double result = Expression.Evaluate(replacements);

            replacements.Add(new VariableReplacement(Token, result));

            return(result);
        }
Exemplo n.º 2
0
        public override double Evaluate(VariableReplacements replacements)
        {
            double result = 0;

            foreach (ExpressionBase ex in Expressions)
            {
                result += ex.Evaluate(replacements);
            }

            return(result);
        }
Exemplo n.º 3
0
 public override double Evaluate(VariableReplacements replacements)
 {
     return(System.Math.Cos(Expression.Evaluate(replacements)));
 }
Exemplo n.º 4
0
 public override double Evaluate(VariableReplacements replacements)
 {
     return(Minuend.Evaluate(replacements) - Subtrahend.Evaluate(replacements));
 }
Exemplo n.º 5
0
 public abstract double Evaluate(VariableReplacements replacements);
Exemplo n.º 6
0
 public override double Evaluate(VariableReplacements replacements)
 {
     return(1 / Expression.Evaluate(replacements));
 }
Exemplo n.º 7
0
 public override double Evaluate(VariableReplacements replacements)
 {
     return(replacements.GetReplacement(Token));
 }
Exemplo n.º 8
0
 public override double Evaluate(VariableReplacements replacements)
 {
     return(Dividend.Evaluate(replacements) / Divisor.Evaluate(replacements));
 }
Exemplo n.º 9
0
 public override double Evaluate(VariableReplacements replacements)
 {
     return(Value);
 }