public override double Evaluate(IDictionary <Class, double> membershipValues)
        {
            var leftValue  = LeftArgument.Evaluate(membershipValues);
            var rightValue = RightArgument.Evaluate(membershipValues);

            return(Math.Min(leftValue, rightValue));
        }
 public override double Operation()
 {
     if (RightArgument.Operation() != 0)
     {
         return(LeftArgument.Operation() / RightArgument.Operation());
     }
     else
     {
         throw new DivideByZeroException("Divizion by zero");
     }
 }
示例#3
0
 public override double Operation()
 {
     return(LeftArgument.Operation() * RightArgument.Operation());
 }
示例#4
0
 public override double Operation()
 {
     return(Math.Pow(LeftArgument.Operation(), RightArgument.Operation()));
 }