Пример #1
0
        public override double Evaluate(VariableReplacements replacements)
        {
            double result = Expression.Evaluate(replacements);

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

            return(result);
        }
Пример #2
0
        public override double Evaluate(VariableReplacements replacements)
        {
            double result = 0;

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

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