Exemplo n.º 1
0
 static void FactorActivationOnlyMuLnodesListedFx(AddToTree.Tree Dummy)
 {
     if (IS.IsNotMinusAndPluseInNode(Dummy))
     {
         if (!(ONLYMULnODE.FINDTreeWithOutThreadConsideration(Dummy)))
         {
             ONLYMULnODE.ADDToTree(Dummy);
             return;
         }
     }
     FactorActivation.FactorActivationOnlyMuLnodesListedFx(Dummy.LeftSideAccess);
     FactorActivation.FactorActivationOnlyMuLnodesListedFx(Dummy.RightSideAccess);
     return;
 }
Exemplo n.º 2
0
        static public AddToTreeTreeLinkList GetMultedElements(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            AddToTreeTreeLinkList HOLDER = new AddToTreeTreeLinkList();

            try
            {
                if (Dummy.SampleAccess != "*")
                {
                    HOLDER.ADDToTree(Dummy);
                }
                else//ERRORCORECTION912847 :refer to page 302.
                {
                    while (!((Dummy.LeftSideAccess == null) && (Dummy.RightSideAccess == null)))
                    {
                        //ERROCORECTION172487 ;the non copy strategy cused to invalid result(effection of To be "1").refer to page 302.
                        if (Dummy.LeftSideAccess.SampleAccess != "*")
                        //    if (!(HOLDER.FINDTreeWithOutThreadConsideration(Dummy.LeftSideAccess)))
                        {
                            HOLDER.ADDToTree(Dummy.CopyNewTree(Dummy.LeftSideAccess));
                            Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                            Dummy.LeftSideAccess.SampleAccess = "1";
                        }
                        if (Dummy.RightSideAccess.SampleAccess != "*")
                        //  if (!(HOLDER.FINDTreeWithOutThreadConsideration(Dummy.RightSideAccess)))
                        {
                            HOLDER.ADDToTree(Dummy.CopyNewTree(Dummy.RightSideAccess));
                            Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                            Dummy.RightSideAccess.SampleAccess = "1";
                        }
                        Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            return(HOLDER);
        }
Exemplo n.º 3
0
        static public AddToTreeTreeLinkList GetBigestCommonFactor(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            AddToTreeTreeLinkList CommonFactors = new AddToTreeTreeLinkList();
            AddToTreeTreeLinkList Holder        = new AddToTreeTreeLinkList();

            //ERRORCORECTION1284797 :refer to page 302.
            Holder = ONLYMULnODE.CopyLinkList();
            AddToTree.Tree        Current    = new AddToTree.Tree(null, false);
            AddToTreeTreeLinkList MulatedMul = new AddToTreeTreeLinkList();

            AddToTree.Tree Factors = null;
            while (!(Holder.ISEmpty()))
            {
                Current = Holder.DELETEFromTreeFirstNode();
                //ERRORCORCTION827346 :Refer to page 302.
                //ERROR715540         :Refer to page 302.
                MULATEDELEMENTS = FactorActivation.GetMultedElements(Current, ref UIS);

                AddToTreeTreeLinkList DummyConsiderationCopy = new AddToTreeTreeLinkList();
                DummyConsiderationCopy = ONLYMULnODE.CopyLinkList();

                AddToTreeTreeLinkList DummyConsideration = new AddToTreeTreeLinkList();
                DummyConsideration = ONLYMULnODE.CopyLinkList();

                AddToTree.Tree EveryMulatedElementsConsideration = new AddToTree.Tree(null, false);

                while (!(MULATEDELEMENTS.ISEmpty()))
                {
                    DummyConsideration = DummyConsiderationCopy.CopyLinkList();
                    EveryMulatedElementsConsideration = MULATEDELEMENTS.DELETEFromTreeFirstNode();
                    //bool IsFactor = false;
                    float Num = 0;
                    if (EveryMulatedElementsConsideration.SampleAccess != null)
                    {
                        if ((IS.IsMinusAndPluseFirstNode(Dummy)) && (IS.ExistElementOnAllMulatedNodes(EveryMulatedElementsConsideration, DummyConsideration, ref UIS)) && (IS.IsNotUpperPowerOfNodeInList(EveryMulatedElementsConsideration, AbledFactors.CopyLinkList(), ref Num)) && (!(AbledFactors.FINDTreeWithOutThreadConsideration(EveryMulatedElementsConsideration))))
                        {
                            Factors = EveryMulatedElementsConsideration;
                            AbledFactors.ADDToTree(Factors);
                        }
                    }
                }
            }
            return(AbledFactors);
        }
        static public AddToTreeTreeLinkList RecursionAndOptimizingLinkListFx(AddToTreeTreeLinkList Dummy)
        {
            if (Dummy.CurrentSizeAccess > -1)
            {
                Formulas.StackTree Stack = new StackTree((Dummy.CurrentSizeAccess) + 1);

                // System.Windows.Forms.MessageBox.Show("2.4.1-The Stsck newed.");

                AddToTree.Tree DummyTree = null;

                while (!(Dummy.ISEmpty()))
                {
                    DummyTree = new AddToTree.Tree(null, false);
                    DummyTree = Dummy.DELETEFromTreeFirstNode();
                    try
                    {
                        if (DummyTree.SampleAccess == null)
                        {
                            continue;
                        }
                        else
                        {
                            Stack.Push(DummyTree);
                        }
                    }
                    catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); continue; }
                }

                // System.Windows.Forms.MessageBox.Show("2.4.2.Stack pushed.");

                while (!(Stack.IsEmpty()))
                {
                    Dummy.ADDToTree(Stack.Pop());
                }

                // System.Windows.Forms.MessageBox.Show("2.4.3.End Of Recursion.");
            }
            return(Dummy);
        }
Exemplo 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); }
 }
Exemplo 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); }
 }
Exemplo n.º 7
0
        static AddToTree.Tree MulDivisionSorterFxAction(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS, ref bool CONTINUE)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            AddToTree.Tree Holder = Dummy;
            Dummy.LeftSideAccess = MulDivisionSorter.MulDivisionSorterFxAction(Dummy.LeftSideAccess, ref UIS, ref CONTINUE);
            try
            {
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
                else
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.RightSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.RightSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            Dummy.RightSideAccess = MulDivisionSorter.MulDivisionSorterFxAction(Dummy.RightSideAccess, ref UIS, ref CONTINUE);
            try
            {
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
                else
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.RightSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.RightSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            int INCREASE = 2147483647 / 12;

            UIS.SetProgressValue(UIS.progressBar13, 0);

            AddToTree.Tree Current = new AddToTree.Tree(null, false);

            bool BREAK = false;

            UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);
            while ((Dummy != null) && (Dummy.RightSideAccess != null))
            {
                AddToTree.Tree HolderCurrent = Dummy;
                if (MULATED.FINDTreeWithThreadConsideration(Dummy))
                {
                    break;
                }
                if (IS.IsFunction(Dummy.SampleAccess))
                {
                    break;
                }
                Current = Dummy.RightSideAccess;
                if (!IS.IsDiv(Current.SampleAccess))
                {
                    break;
                }
                if (IS.IsOperator(Dummy.SampleAccess) && (!((Dummy.SampleAccess == "*") || (Dummy.SampleAccess == "/"))))
                {
                    BREAK = true;
                }

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

                if (!BREAK)
                {
                    while ((Current != null) && (Current.RightSideAccess != null))
                    {
                        if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Current))
                        {
                            break;
                        }
                        if (IS.IsFunction(Current.SampleAccess))
                        {
                            break;
                        }
                        //ERRORCORECTION1982748234 :Refer to page 249.
                        if (!((Dummy.SampleAccess == "*") && (Current.SampleAccess == "/")))
                        {
                            break;
                        }
                        if (MULATED.FINDTreeWithThreadConsideration(Current))
                        {
                            break;
                        }
                        if (MULATED.FINDTreeWithThreadConsideration(Dummy))
                        {
                            break;
                        }
                        if (IS.IsOperator(Dummy.SampleAccess) && (!((Dummy.SampleAccess == "*") || (Dummy.SampleAccess == "/"))))
                        {
                            BREAK = true;//LOCATION98174723742 :Rfer to page 249.
                        }
                        //ERROR1892386124 :The Same node of Current and Dummy node.refer to page 238.
                        if (!BREAK)//ERRORCORECTION897123 :The ERROR31704152 corrected.
                        {
                            if ((Current.SampleAccess == "/") && (Dummy.SampleAccess == "*"))
                            {
                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                if (Dummy.FINDTreeWithThreadConsideration(Current, Dummy) != null)
                                {
                                    break;
                                }
                                CONTINUE = true;
                                AddToTree.Tree LOCAL = Dummy;
                                //ERROR1928749712 :The *** Mraked edited.refer to page 256.
                                AddToTree.Tree MUL = new AddToTree.Tree("*", false);
                                MUL.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess), Current.CopyNewTree(Current.LeftSideAccess));

                                MUL.ThreadAccess = null;

                                MUL.LeftSideAccess.ThreadAccess  = MUL;
                                MUL.RightSideAccess.ThreadAccess = MUL;

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

                                AddToTree.Tree Contained = Dummy;

                                while (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Current, Dummy)))
                                {
                                    Dummy = Dummy.RightSideAccess;
                                }
                                //====

                                //LOCATION30415071.refer to page 256.
                                //ERRORCORECTION9318279 :The invalid leftside assignment.refer to page 218.
                                Dummy = Dummy.ThreadAccess;
                                //ERROR92834876 :The Division node is located at left side of Mul and in othere is located at right side.refer to page 336.

                                /*Dummy.RightSideAccess.LeftSideAccess = MUL;
                                 * Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                                 * Dummy.RightSideAccess.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;
                                 * Dummy.RightSideAccess.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;
                                 */
                                //ERRORCORECTION19208734 :The Above Error.(ERROR92834876)refer to page 336.
                                Dummy.RightSideAccess.LeftSideAccess = MUL;
                                Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                                Dummy.RightSideAccess.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.RightSideAccess.LeftSideAccess;
                                Dummy.RightSideAccess.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;

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



                                //while ((Dummy.ThreadAccess != null) && (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy,LOCAL))))
                                //  Dummy = Dummy.ThreadAccess;

                                //LOCATION30415071.refer to page 256.
                                //ERRORCORECTION9318279 :The invalid leftside assignment.refer to page 218.
                                if (Dummy.ThreadAccess != null)
                                {
                                    //Dummy = Dummy.ThreadAccess;
                                    //Dummy.RightSideAccess = Dummy.LeftSideAccess.LeftSideAccess;
                                    //ERRORCUASED817263 :Refer to page 244.
                                    //Dummy.ThreadAccess = A;
                                    //Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                    Dummy.RightSideAccess.ThreadAccess = Dummy.ThreadAccess;
                                    Dummy = Dummy.RightSideAccess;
                                }
                                else
                                {
                                    Dummy = Dummy.RightSideAccess;
                                    Dummy.ThreadAccess = null;
                                }
                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                MULATED.ADDToTree(Dummy);
                                MULATED.ADDToTree(Current);
                                //Holder = Dummy;
                                //        while ((Dummy != null) && (!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy,LOCAL)))
                                //          Dummy = Dummy.RightSideAccess;
                                break;
                            }
                        }
                        Current = Current.RightSideAccess;
                    }
                }
                if (BREAK)
                {
                    break;
                }
                if (!CONTINUE)
                {
                    if (Dummy.RightSideAccess != null)
                    {
                        Dummy = Dummy.RightSideAccess;
                    }
                }
                else
                {
                    break;
                }
                //               if (Dummy.RightSideAccess != null)
                //             Current = Dummy.RightSideAccess;
            }

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

            //while ((Dummy.ThreadAccess != null) && (!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Holder)))
            //       Dummy = Dummy.ThreadAccess;


            Current = Dummy.LeftSideAccess;

            while ((Dummy != null) && (Dummy.LeftSideAccess != null))
            {
                if (MULATED.FINDTreeWithThreadConsideration(Dummy))
                {
                    break;
                }
                if (IS.IsFunction(Dummy.SampleAccess))
                {
                    break;
                }
                Current = Dummy.LeftSideAccess;
                if (!IS.IsDiv(Current.SampleAccess))
                {
                    break;
                }
                AddToTree.Tree HolderCurrent = Dummy;
                if (IS.IsOperator(Dummy.SampleAccess) && (!((Dummy.SampleAccess == "*") || (Dummy.SampleAccess == "/"))))
                {
                    BREAK = true;
                }
                if (!BREAK)
                {
                    while ((Current != null) && (Current.LeftSideAccess != null))
                    {
                        if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Current))
                        {
                            break;
                        }
                        if (MULATED.FINDTreeWithThreadConsideration(Current))
                        {
                            break;
                        }
                        //ERRORCORECTINO1782647 :On four Section of while added thwe non function condition.refre to page 226.
                        if (IS.IsFunction(Current.SampleAccess))
                        {
                            break;
                        }
                        if (MULATED.FINDTreeWithThreadConsideration(Dummy))
                        {
                            break;
                        }
                        if (IS.IsOperator(Dummy.SampleAccess) && (!((Dummy.SampleAccess == "*") || (Dummy.SampleAccess == "/"))))
                        {
                            BREAK = true;
                        }
                        //ERRORCORECTION1982748234 :Refer to page 249.
                        if (!((Dummy.SampleAccess == "*") && (Current.SampleAccess == "/")))
                        {
                            break;  //LOCATION98174723741 :Refer to page 249
                        }
                        if (!BREAK) //ERRORCORECTION897123 :The ERROR31704152 corrected.
                        {
                            if ((Current.SampleAccess == "/") && (Dummy.SampleAccess == "*"))
                            {
                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                if (Dummy.FINDTreeWithThreadConsideration(Current, Dummy) != null)
                                {
                                    break;
                                }
                                CONTINUE = true;
                                AddToTree.Tree LOCAL = Dummy;
                                AddToTree.Tree MUL   = new AddToTree.Tree("*", false);
                                MUL.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess), Current.CopyNewTree(Current.LeftSideAccess));

                                MUL.ThreadAccess = null;

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

                                MUL.LeftSideAccess.ThreadAccess  = MUL;
                                MUL.RightSideAccess.ThreadAccess = MUL;

                                AddToTree.Tree Contained = Dummy;

                                while (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Current, Dummy)))
                                {
                                    Dummy = Dummy.LeftSideAccess;
                                }
                                //ERRRORCORECTION1297192 :Replacement mul on non-proper location.reer to page 218.

                                //Dummy = Dummy.LeftSideAccess;

                                //                        Dummy.LeftSideAccess = MUL;
                                //                      Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                //                    Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.LeftSideAccess;
                                //                  Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
                                Dummy = Dummy.ThreadAccess;
                                //ERROR92834876 :The Division node is located at left side of Mul and in othere is located at right side.refer to page 336.

                                /*Dummy.RightSideAccess.LeftSideAccess = MUL;
                                 * Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                                 * Dummy.RightSideAccess.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;
                                 * Dummy.RightSideAccess.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess.LeftSideAccess;
                                 */
                                //ERRORCORECTION19208734 :The Above Error.(ERROR92834876)refer to page 336.
                                Dummy.LeftSideAccess.LeftSideAccess = MUL;
                                Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                                Dummy.LeftSideAccess.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.LeftSideAccess.LeftSideAccess;
                                Dummy.LeftSideAccess.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess.LeftSideAccess;

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



                                //while ((Dummy.ThreadAccess != null) && (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy,LOCAL))))
                                //  Dummy = Dummy.ThreadAccess;

                                //LOCATION30415071.refer to page 256.
                                //ERRORCORECTION9318279 :The invalid leftside assignment.refer to page 218.
                                if (Dummy.ThreadAccess != null)
                                {
                                    //Dummy = Dummy.ThreadAccess;
                                    //Dummy.RightSideAccess = Dummy.LeftSideAccess.LeftSideAccess;
                                    //ERRORCUASED817263 :Refer to page 244.
                                    //Dummy.ThreadAccess = A;
                                    //Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                    Dummy.LeftSideAccess.ThreadAccess = Dummy.ThreadAccess;
                                    Dummy = Dummy.LeftSideAccess;
                                }
                                else
                                {
                                    Dummy = Dummy.LeftSideAccess;
                                    Dummy.ThreadAccess = null;
                                }
                                UIS.SetProgressValue(UIS.progressBar13, INCREASE + UIS.progressBar13.Value);

                                MULATED.ADDToTree(Dummy);
                                MULATED.ADDToTree(Current);
                                //Holder = Dummy;
                                //while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy,Contained))
                                //  Dummy = Dummy.ThreadAccess;
                                break;
                            }
                        }
                        Current = Current.LeftSideAccess;
                    }
                }
                if (BREAK)
                {
                    break;
                }
                if (!CONTINUE)
                {
                    if (Dummy.LeftSideAccess != null)
                    {
                        Dummy = Dummy.LeftSideAccess;
                    }
                }
                else
                {
                    break;
                }
                //
                //if (Dummy.LeftSideAccess != null)
                //  Current = Dummy.LeftSideAccess;
            }
            //while ((Dummy.ThreadAccess != null) && (!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Holder)))
            //  Dummy = Dummy.ThreadAccess;
            //ERROCORECTION198274896 :The Thread become null and the extra mulated nodes dose not removed.refer to page 336.
            try
            {
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
                else
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.RightSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.RightSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar13, 2147483647);
            return(Dummy);
        }
Exemplo n.º 8
0
        static AddToTree.Tree RepeatedlyDeletedAction(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            DeletingMultaplification.RepeatedlyDeletedAction(Dummy.LeftSideAccess, ref UIS);
            DeletingMultaplification.RepeatedlyDeletedAction(Dummy.RightSideAccess, ref UIS);
            AddToTree.Tree Current    = Dummy;
            AddToTree.Tree CurrentTow = Dummy.LeftSideAccess;
            //int INCREASE = 2147483647 / 9;

            try
            {
                UIS.SetProgressValue(UIS.progressBar14, 0);
                if (CurrentTow != null)
                {
                    if (Dummy != null)
                    {
                        while ((IS.IsMul(Dummy.SampleAccess)))
                        {
                            if (!DELETED.FINDTreeWithThreadConsideration(Dummy))
                            {
                                if (!EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow, Dummy))
                                {
                                    if (CurrentTow != null)
                                    {
                                        while ((IS.IsMul(CurrentTow.SampleAccess)) && (CurrentTow != null))
                                        {
                                            if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
                                            {
                                                if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                                {
                                                    ///bool LeftTrueRightFalse = false;
                                                    ///if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.LeftSideAccess, CurrentTow))
                                                    ///LeftTrueRightFalse = true;
                                                    ///else
                                                    //if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.RightSideAccess, CurrentTow))
                                                    //  LeftTrueRightFalse = false;
                                                    AddToTree.Tree HOLDE           = Dummy;
                                                    AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                    Dummy.SetLefTandRightCommonlySide(CurrentTow.RightSideAccess, Dummy.RightSideAccess);
                                                    Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                    while (Dummy.ThreadAccess != null)
                                                    {
                                                        Dummy = Dummy.ThreadAccess;
                                                    }
                                                    Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, CurrentTow);
                                                    Dummy.SetLefTandRightCommonlySide(Dummy.LeftSideAccess, DummyCurrentTow);
                                                    Dummy.RightSideAccess.ThreadAccess = Dummy;
                                                    while (Dummy.ThreadAccess != null)
                                                    {
                                                        Dummy = Dummy.ThreadAccess;
                                                    }
                                                    Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, HOLDE);
                                                    DELETED.ADDToTree(Dummy);
                                                }
                                            }



                                            if (IS.ISindependenceVaribale(Dummy.LeftSideAccess.SampleAccess))
                                            {
                                                if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                                {
                                                    if ((IS.IsPower(CurrentTow.RightSideAccess.SampleAccess)) || (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess)))
                                                    {
                                                        if ((IS.ISindependenceVaribale(CurrentTow.RightSideAccess.LeftSideAccess.SampleAccess)) || (IS.IsNumber(CurrentTow.RightSideAccess.RightSideAccess.SampleAccess)))
                                                        {
                                                            AddToTree.Tree HOLDE           = Dummy;
                                                            AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                            Dummy.SetLefTandRightCommonlySide(CurrentTow.LeftSideAccess, Dummy.RightSideAccess);
                                                            Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                            while (Dummy.ThreadAccess != null)
                                                            {
                                                                Dummy = Dummy.ThreadAccess;
                                                            }
                                                            Dummy = CurrentTow;
                                                            Dummy.SetLefTandRightCommonlySide(DummyCurrentTow, Dummy.RightSideAccess);
                                                            Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                            while (Dummy.ThreadAccess != null)
                                                            {
                                                                Dummy = Dummy.ThreadAccess;
                                                            }
                                                            while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, HOLDE))
                                                            {
                                                                Dummy = Dummy.LeftSideAccess;
                                                            }
                                                            DELETED.ADDToTree(Dummy);
                                                        }
                                                    }
                                                }
                                            }

                                            if (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess))
                                            {
                                                if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                                {
                                                    if ((IS.IsPower(Dummy.LeftSideAccess.SampleAccess)) || (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess)))
                                                    {
                                                        if ((IS.ISindependenceVaribale(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess)) || (IS.IsNumber(CurrentTow.RightSideAccess.RightSideAccess.SampleAccess)))
                                                        {
                                                            AddToTree.Tree HOLDE           = Dummy;
                                                            AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                            Dummy.SetLefTandRightCommonlySide(CurrentTow.LeftSideAccess, Dummy.RightSideAccess);
                                                            Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                            while (Dummy.ThreadAccess != null)
                                                            {
                                                                Dummy = Dummy.ThreadAccess;
                                                            }
                                                            Dummy = CurrentTow;
                                                            Dummy.SetLefTandRightCommonlySide(DummyCurrentTow, Dummy.RightSideAccess);
                                                            Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                            while (Dummy.ThreadAccess != null)
                                                            {
                                                                Dummy = Dummy.ThreadAccess;
                                                            }
                                                            while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, HOLDE))
                                                            {
                                                                Dummy = Dummy.LeftSideAccess;
                                                            }
                                                            DELETED.ADDToTree(Dummy);
                                                        }
                                                    }
                                                }
                                            }


                                            CurrentTow = CurrentTow.LeftSideAccess;
                                        }
                                    }
                                }
                            }
                            if (Dummy.LeftSideAccess == null)
                            {
                                break;
                            }
                            Dummy      = Dummy.LeftSideAccess;
                            CurrentTow = Dummy.LeftSideAccess;
                        }
                    }
                }
                //Dummy= Dummy;
                while ((!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Current)) && (Dummy.ThreadAccess != null))
                {
                    Dummy = Dummy.ThreadAccess;
                }
                CurrentTow = Dummy.RightSideAccess;

                UIS.SetProgressValue(UIS.progressBar14, 2147483647 / 2);

                if (CurrentTow != null)
                {
                    while (IS.IsMul(Dummy.SampleAccess))
                    {
                        if (CurrentTow != null)
                        {
                            while (IS.IsMul(CurrentTow.SampleAccess) && (CurrentTow != null))
                            {
                                if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
                                {
                                    if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                    {
                                        ///bool LeftTrueRightFalse = false;
                                        ///if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.LeftSideAccess, CurrentTow))
                                        ///LeftTrueRightFalse = true;
                                        ///else
                                        //if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.RightSideAccess, CurrentTow))
                                        //  LeftTrueRightFalse = false;
                                        AddToTree.Tree HOLDE           = Dummy;
                                        AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                        Dummy.SetLefTandRightCommonlySide(CurrentTow.RightSideAccess, Dummy.RightSideAccess);
                                        Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                        while (Dummy.ThreadAccess != null)
                                        {
                                            Dummy = Dummy.ThreadAccess;
                                        }
                                        Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, CurrentTow);
                                        Dummy.SetLefTandRightCommonlySide(Dummy.LeftSideAccess, DummyCurrentTow);
                                        Dummy.RightSideAccess.ThreadAccess = Dummy;
                                        while (Dummy.ThreadAccess != null)
                                        {
                                            Dummy = Dummy.ThreadAccess;
                                        }
                                        Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, HOLDE);
                                        DELETED.ADDToTree(Dummy);
                                    }
                                }


                                if (IS.ISindependenceVaribale(Dummy.LeftSideAccess.SampleAccess))
                                {
                                    if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                    {
                                        if ((IS.IsPower(CurrentTow.RightSideAccess.SampleAccess)) || (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess)))
                                        {
                                            if ((IS.ISindependenceVaribale(CurrentTow.RightSideAccess.LeftSideAccess.SampleAccess)) || (IS.IsNumber(CurrentTow.RightSideAccess.RightSideAccess.SampleAccess)))
                                            {
                                                ///bool LeftTrueRightFalse = false;
                                                ///if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.LeftSideAccess, CurrentTow))
                                                ///LeftTrueRightFalse = true;
                                                ///else
                                                //if (EqualToObject.IsEqualWithThreadConsiderationCommonly(CurrentTow.ThreadAccess.RightSideAccess, CurrentTow))
                                                //  LeftTrueRightFalse = false;
                                                AddToTree.Tree HOLDE           = Dummy;
                                                AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                Dummy.SetLefTandRightCommonlySide(CurrentTow.LeftSideAccess, Dummy.RightSideAccess);
                                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                while (Dummy.ThreadAccess != null)
                                                {
                                                    Dummy = Dummy.ThreadAccess;
                                                }
                                                //Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, CurrentTow);
                                                Dummy = CurrentTow;
                                                Dummy.SetLefTandRightCommonlySide(DummyCurrentTow, Dummy.RightSideAccess);
                                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                while (Dummy.ThreadAccess != null)
                                                {
                                                    Dummy = Dummy.ThreadAccess;
                                                }
                                                //Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, HOLDE);
                                                while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, HOLDE))
                                                {
                                                    Dummy = Dummy.RightSideAccess;
                                                }
                                                DELETED.ADDToTree(Dummy);
                                            }
                                        }
                                    }
                                }


                                if (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess))
                                {
                                    if (IS.IsNumber(CurrentTow.LeftSideAccess.SampleAccess))
                                    {
                                        if ((IS.IsPower(Dummy.LeftSideAccess.SampleAccess)) || (IS.ISindependenceVaribale(CurrentTow.RightSideAccess.SampleAccess)))
                                        {
                                            if ((IS.ISindependenceVaribale(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess)) || (IS.IsNumber(CurrentTow.RightSideAccess.RightSideAccess.SampleAccess)))
                                            {
                                                AddToTree.Tree HOLDE           = Dummy;
                                                AddToTree.Tree DummyCurrentTow = Dummy.LeftSideAccess;
                                                Dummy.SetLefTandRightCommonlySide(CurrentTow.LeftSideAccess, Dummy.RightSideAccess);
                                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                while (Dummy.ThreadAccess != null)
                                                {
                                                    Dummy = Dummy.ThreadAccess;
                                                }
                                                Dummy = CurrentTow;
                                                Dummy.SetLefTandRightCommonlySide(DummyCurrentTow, Dummy.RightSideAccess);
                                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                                while (Dummy.ThreadAccess != null)
                                                {
                                                    Dummy = Dummy.ThreadAccess;
                                                }
                                                while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, HOLDE))
                                                {
                                                    Dummy = Dummy.LeftSideAccess;
                                                }
                                                DELETED.ADDToTree(Dummy);
                                            }
                                        }
                                    }
                                }


                                CurrentTow = CurrentTow.RightSideAccess;
                            }
                        }
                        if (Dummy.RightSideAccess == null)
                        {
                            break;
                        }
                        Dummy      = Dummy.RightSideAccess;
                        CurrentTow = Dummy.RightSideAccess;
                    }
                }
                while ((!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Current)) && (Dummy.ThreadAccess != null))
                {
                    Dummy = Dummy.ThreadAccess;
                }
            }
            catch (NullReferenceException t)
            {
                ExceptionClass.ExceptionClassMethod(t);
            }
            UIS.SetProgressValue(UIS.progressBar14, 2147483647);
            return(Dummy);
        }