예제 #1
0
        public void fouth()
        {
            for (int point = 0; point < elements.Count; ++point)
            {
                switch (elements[point].Symbol)
                {
                case "kbtogb":
                    Replace(Mathematics.Kbtogb(elements[point + 1]), point);
                    Delete(point + 1, 1);
                    break;

                case "gamma":
                    Replace(Mathematics.Gamma(elements[point + 1]), point);
                    Delete(point + 1, 1);
                    break;

                case "beta":
                    Replace(Mathematics.Beta(elements[point + 1], elements[point + 2]), point);
                    Delete(point + 1, 2);
                    break;
                }
            }
        }
예제 #2
0
 public void fifth()
 {
     for (int point = 0; point < elements.Count; ++point)
     {
         switch (elements[point].Symbol)
         {
         case "*":
             Replace(Mathematics.Multiplication(elements[point - 1], elements[point + 1]), point - 1);
             Delete(point, 2);
             break;
         }
     }
     for (int point = 0; point < elements.Count; ++point)
     {
         switch (elements[point].Symbol)
         {
         case "+":
             Replace(Mathematics.Plus(elements[point - 1], elements[point + 1]), point - 1);
             Delete(point, 2);
             break;
         }
     }
 }