static bool AllowToMulMinusePluseActionFx(AddToTree.Tree Dummy)
        {
            if (Dummy == null)
            {
                return(true);
            }
            bool Is = true;

            if (Dummy.SampleAccess == "/")
            {
                if (IS.IsMinuseOrPluse(Dummy.SampleAccess))
                {
                    AddToTreeTreeLinkList FACTOR = FindSubFactor.FindSubFactorFx(Dummy.LeftSideAccess, Dummy.RightSideAccess);
                    if (!(FACTOR.ISEmpty()))
                    {
                        AddToTree.Tree FACT = new AddToTree.Tree(null, false);
                        do
                        {
                            FACT = FACTOR.DELETEFromTreeFirstNode();
                            if (IS.IsMinuseOrPluse(FACT.SampleAccess))
                            {
                                Is = false;
                            }
                        }while(!(FACTOR.ISEmpty()));
                    }
                }
            }
            Is = Is && (AllowToMulMinusePluse.AllowToMulMinusePluseActionFx(Dummy.LeftSideAccess));
            Is = Is && (AllowToMulMinusePluse.AllowToMulMinusePluseActionFx(Dummy.RightSideAccess));
            return(Is);
        }
Esempio n. 2
0
 static void FindSubFactorActionFx(AddToTree.Tree Dummy1, AddToTree.Tree Dummy2)
 {
     FindSubFactor.FindSubFactorCommonAddedToListFx(Dummy1);
     //ERRORCORECTION1287648764 :The condition caused to  Non Requirment Supliments of data.
     //if(Dummy2.SampleAccess == "*")
     FindSubFactor.FindSubFactorCommonFinalizationFx(Dummy2);
 }
Esempio n. 3
0
 static public AddToTreeTreeLinkList FindSubFactorFx(AddToTree.Tree Dummy1, AddToTree.Tree Dummy2)
 {
     while (!(FACTORLISTEDS.ISEmpty()))
     {
         FACTORLISTEDS.DELETEFromTreeFirstNode();
     }
     while (!(COMMONFACTORS.ISEmpty()))
     {
         COMMONFACTORS.DELETEFromTreeFirstNode();
     }
     while (!(NOTEXPECTED.ISEmpty()))
     {
         NOTEXPECTED.DELETEFromTreeFirstNode();
     }
     FindSubFactor.FindSubFactorActionFx(Dummy1, Dummy2);
     return(COMMONFACTORS);
 }
        static public AddToTree.Tree SimplifierCommonSubFactorCalculatorFx(AddToTree.Tree Dummy, ref bool CONTINUE, ref UknownIntegralSolver UIS)
        {
            if ((Dummy == null) || (!(IS.IsDivInNode(Dummy))))
            {
                return(Dummy);
            }
            //ERRORCORECTION2189743 :the Second condition of above is added.
            int INCREASE = 2147483647 / 9;

            UIS.SetProgressValue(UIS.progressBar9, 0);
            if (Dummy.SampleAccess == "/")
            {
                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);
                Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);
                Dummy.LeftSideAccess = FactorActivation.FactorActivationFx(Dummy.LeftSideAccess, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                Dummy.RightSideAccess = FactorActivation.FactorActivationFx(Dummy.RightSideAccess, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                /* try
                 * {
                 *    Dummy.LeftSideAccess.ThreadAccess = Dummy;
                 *   Dummy.RightSideAccess.ThreadAccess = Dummy;
                 * }
                 * catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
                 */
                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                Dummy = NumberDivMul.NumberDivMulFx(Dummy, ref UIS);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);
                AddToTreeTreeLinkList COMMONFACTOR = FindSubFactor.FindSubFactorFx(Dummy.LeftSideAccess, Dummy.RightSideAccess);
                bool           ENDLEFT             = false;
                bool           ENDRIGHT            = false;
                AddToTree.Tree COMMONSUBFACORT     = new AddToTree.Tree(null, false);

                UIS.SetProgressValue(UIS.progressBar9, INCREASE + UIS.progressBar9.Value);

                while (!((COMMONFACTOR.ISEmpty())) && ((ENDLEFT && ENDRIGHT)))
                {
                    CONTINUE        = true;
                    COMMONSUBFACORT = COMMONFACTOR.DELETEFromTreeFirstNode();
                    if (!ENDLEFT)
                    {
                        Dummy.LeftSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionLeftSideFx(Dummy.LeftSideAccess, COMMONSUBFACORT, ref ENDLEFT, FindSubFactor.FACTORLISTEDSAccess());
                    }
                    if (!ENDRIGHT)
                    {
                        Dummy.RightSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionRightSideFx(Dummy.RightSideAccess, COMMONSUBFACORT, ref ENDRIGHT, FindSubFactor.NotExpectedAccess());
                    }

                    Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);
                }

                UIS.SetProgressValue(UIS.progressBar9, 2147483647);

                if (!((IS.IsDivInNode(Dummy.LeftSideAccess)) || (IS.IsDivInNode(Dummy.RightSideAccess))))
                {
                    return(Dummy);
                }
            }
            if (Dummy.LeftSideAccess != null)
            {
                Dummy.LeftSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorCalculatorFx(Dummy.LeftSideAccess, ref CONTINUE, ref UIS);
            }

            if (Dummy.RightSideAccess != null)
            {
                Dummy.RightSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorCalculatorFx(Dummy.RightSideAccess, ref CONTINUE, ref UIS);
            }
            return(Dummy);
        }
Esempio n. 5
0
 static void FindSubFactorCommonAddedToListFx(AddToTree.Tree Dummy1)
 {
     if (Dummy1 == null)
     {
         return;
     }
     //ERRORGESSESSADDED8127466 :refer to page 328.
     //ERRORCORECTION892374978 :Refer to page 330.
     if ((!(IS.IsMulInNode(Dummy1))) && (FACTORLISTEDS.ISEmpty()))
     {
         if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1)))
         {
             FACTORLISTEDS.ADDToTree(Dummy1);
         }
     }
     try
     {
         if (Dummy1.SampleAccess == "*")
         {
             //if ((!(IS.IsNumber(Dummy1.LeftSideAccess.SampleAccess))) && (Dummy1.LeftSideAccess.SampleAccess != "*"))
             //{
             //if (!IS.IsMulInNode(Dummy1.LeftSideAccess))
             if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.LeftSideAccess)))
             {
                 FACTORLISTEDS.ADDToTree(Dummy1.LeftSideAccess);
             }
             if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.LeftSideAccess)))
             {
                 if (Dummy1.LeftSideAccess.SampleAccess == "^")
                 {
                     if (IS.IsNumber(Dummy1.LeftSideAccess.RightSideAccess.SampleAccess))
                     {
                         //if (!IS.IsMulInNode(Dummy1.LeftSideAccess.LeftSideAccess))
                         if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.LeftSideAccess.LeftSideAccess)))
                         {
                             FACTORLISTEDS.ADDToTree(Dummy1.LeftSideAccess.LeftSideAccess);
                         }
                     }
                 }
             }
             //}
             //if ((!(IS.IsNumber(Dummy1.RightSideAccess.SampleAccess))) && (Dummy1.RightSideAccess.SampleAccess != "*"))
             //{
             //if (!IS.IsMulInNode(Dummy1.RightSideAccess))
             if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.RightSideAccess)))
             {
                 FACTORLISTEDS.ADDToTree(Dummy1.RightSideAccess);
             }
             if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.RightSideAccess)))
             {
                 if (Dummy1.RightSideAccess.SampleAccess == "^")
                 {
                     if (IS.IsNumber(Dummy1.RightSideAccess.RightSideAccess.SampleAccess))
                     {
                         //if (!IS.IsMulInNode(Dummy1.RightSideAccess.LeftSideAccess))
                         if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.RightSideAccess.LeftSideAccess)))
                         {
                             FACTORLISTEDS.ADDToTree(Dummy1.RightSideAccess.LeftSideAccess);
                         }
                     }
                 }
             }
             //}
         }
         FindSubFactor.FindSubFactorCommonAddedToListFx(Dummy1.LeftSideAccess);
         FindSubFactor.FindSubFactorCommonAddedToListFx(Dummy1.RightSideAccess);
     }
     catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
 }
Esempio n. 6
0
 static void FindSubFactorCommonFinalizationFx(AddToTree.Tree Dummy2)
 {
     if (Dummy2 == null)
     {
         return;
     }
     if ((Dummy2.SampleAccess == "+") || (Dummy2.SampleAccess == "-"))
     {
         if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy2)))
         {
             NOTEXPECTED.ADDToTree(Dummy2);
             return;
         }
     }
     try
     {
         //ADDEDCONDTITION9281374 :Refer to page 328.
         //ERRORCORECTION98127489 :refer to page 328.
         //ERRORCORECTION892374978 :Refer to page 330.
         if ((!(IS.IsMulInNode(Dummy2))) && (COMMONFACTORS.ISEmpty()))
         {
             if ((FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy2)) && (!(COMMONFACTORS.FINDTreeWithOutThreadConsideration(Dummy2))))
             {
                 COMMONFACTORS.ADDToTree(Dummy2);
                 //LOCATION3070405000 :refer to page 300.
                 FACTORLISTEDS.DELETEFromTreeFindedNode(Dummy2);
                 NOTEXPECTED.DELETEFromTreeFindedNode(Dummy2);
             }
             else
             if ((Dummy2.SampleAccess == "^") && (IS.IsNumber(Dummy2.RightSideAccess.RightSideAccess.SampleAccess)) && ((FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy2.RightSideAccess.LeftSideAccess))) && (!(COMMONFACTORS.FINDTreeWithOutThreadConsideration(Dummy2.LeftSideAccess))))
             {
                 COMMONFACTORS.ADDToTree(Dummy2.LeftSideAccess);
                 FACTORLISTEDS.DELETEFromTreeFindedNode(Dummy2.LeftSideAccess);
                 NOTEXPECTED.DELETEFromTreeFindedNode(Dummy2.LeftSideAccess);
             }
             else
             {
                 NOTEXPECTED.ADDToTree(Dummy2);
             }
         }
         if (Dummy2.SampleAccess == "*")
         {
             //if (!IS.IsNumber(Dummy2.LeftSideAccess.SampleAccess))
             //{
             if ((!(COMMONFACTORS.FINDTreeWithOutThreadConsideration(Dummy2.LeftSideAccess))) && (FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy2.LeftSideAccess)))
             {
                 COMMONFACTORS.ADDToTree(Dummy2.LeftSideAccess);
                 FACTORLISTEDS.DELETEFromTreeFindedNode(Dummy2.LeftSideAccess);
                 NOTEXPECTED.DELETEFromTreeFindedNode(Dummy2.LeftSideAccess);
             }
             else
             if ((Dummy2.LeftSideAccess.SampleAccess == "^") && (IS.IsNumber(Dummy2.LeftSideAccess.RightSideAccess.SampleAccess)) && ((FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy2.LeftSideAccess.LeftSideAccess))) && (!(COMMONFACTORS.FINDTreeWithOutThreadConsideration(Dummy2.LeftSideAccess.LeftSideAccess))))
             {
                 COMMONFACTORS.ADDToTree(Dummy2.LeftSideAccess.LeftSideAccess);
                 FACTORLISTEDS.DELETEFromTreeFindedNode(Dummy2.LeftSideAccess.LeftSideAccess);
                 NOTEXPECTED.DELETEFromTreeFindedNode(Dummy2.LeftSideAccess.LeftSideAccess);
             }
             else
             {
                 NOTEXPECTED.ADDToTree(Dummy2.LeftSideAccess);
             }
             //}
             //if (!IS.IsNumber(Dummy2.RightSideAccess.SampleAccess))
             //{
             if ((FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy2.RightSideAccess)) && (!(COMMONFACTORS.FINDTreeWithOutThreadConsideration(Dummy2.RightSideAccess))))
             {
                 COMMONFACTORS.ADDToTree(Dummy2.RightSideAccess);
                 //LOCATION3070405000 :refer to page 300.
                 FACTORLISTEDS.DELETEFromTreeFindedNode(Dummy2.RightSideAccess);
                 NOTEXPECTED.DELETEFromTreeFindedNode(Dummy2.RightSideAccess);
             }
             else
             if ((Dummy2.RightSideAccess.SampleAccess == "^") && (IS.IsNumber(Dummy2.RightSideAccess.RightSideAccess.SampleAccess)) && ((FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy2.RightSideAccess.LeftSideAccess))) && (!(COMMONFACTORS.FINDTreeWithOutThreadConsideration(Dummy2.RightSideAccess.LeftSideAccess))))
             {
                 COMMONFACTORS.ADDToTree(Dummy2.RightSideAccess.LeftSideAccess);
                 FACTORLISTEDS.DELETEFromTreeFindedNode(Dummy2.RightSideAccess.LeftSideAccess);
                 NOTEXPECTED.DELETEFromTreeFindedNode(Dummy2.RightSideAccess.LeftSideAccess);
             }
             else
             {
                 NOTEXPECTED.ADDToTree(Dummy2.RightSideAccess);
             }
             //  }
         }
         FindSubFactor.FindSubFactorCommonFinalizationFx(Dummy2.LeftSideAccess);
         FindSubFactor.FindSubFactorCommonFinalizationFx(Dummy2.RightSideAccess);
     }
     catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
 }