コード例 #1
0
 static AddToTree.Tree ConvertExtraFactorsToone(AddToTree.Tree Dummy, AddToTree.Tree Factors, ref bool Action, bool Current)
 {
     if (Dummy == null)
     {
         return(Dummy);
     }
     if ((EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, Factors)) && (!Action) && (!Current))
     {
         Action = true;
         Dummy.SetLefTandRightCommonlySide(null, null);
         Dummy.SampleAccess = "1";
     }
     Dummy.LeftSideAccess  = FactorActivation.ConvertExtraFactorsToone(Dummy.LeftSideAccess, Factors, ref Action, Current);
     Dummy.RightSideAccess = FactorActivation.ConvertExtraFactorsToone(Dummy.RightSideAccess, Factors, ref Action, Current);
     return(Dummy);
 }
コード例 #2
0
        static bool ExistElementOnAllMulatedNodesAction(AddToTree.Tree Dummy, AddToTreeTreeLinkList MULATEDELEMENTS)
        {
            bool Is = false;

            AddToTree.Tree MuLnode = new AddToTree.Tree(null, false);
            while (!(MULATEDELEMENTS.ISEmpty()))
            {
                MuLnode = MULATEDELEMENTS.DELETEFromTreeFirstNode();
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, MuLnode))
                {
                    Is = true;
                    break;
                }
            }
            return(Is);
        }
コード例 #3
0
 static AddToTree.Tree SimplifierCommonSubFactorActionRightSideFx(AddToTree.Tree Dummy, AddToTree.Tree COMMONSUBFACTOR, ref bool END, AddToTreeTreeLinkList NOTFACTOR)
 {
     if (Dummy == null)
     {
         return(Dummy);
     }
     if (Dummy.SampleAccess != "*")
     {
         if (NOTFACTOR.FINDTreeWithOutThreadConsideration(Dummy))
         {
             return(Dummy);
         }
     }
     if (END)
     {
         return(Dummy);
     }
     try
     {   //ERROCRECTIOn98217487 :the last condition (Dummy.ThreadAccess.SampleAccess) is Div.
         if ((EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, COMMONSUBFACTOR) && (Dummy.ThreadAccess.SampleAccess == "*") || (Dummy.ThreadAccess.SampleAccess == "/")))
         {
             Dummy.SetLefTandRightCommonlySide(null, null);
             Dummy.SampleAccess = "1";
             END = true;
         }
         else
         if ((Dummy.ThreadAccess.SampleAccess == "^") && (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, COMMONSUBFACTOR)) && (IS.IsNumber(Dummy.ThreadAccess.RightSideAccess.SampleAccess)))
         {
             float NUM = (float)System.Convert.ToDouble(Dummy.ThreadAccess.RightSideAccess.SampleAccess);
             NUM = NUM - 1;
             if (NUM > 0)
             {
                 Dummy.ThreadAccess.RightSideAccess.SampleAccess = NUM.ToString();
             }
             else
             {
                 Dummy.SetLefTandRightCommonlySide(null, null);
                 Dummy.SampleAccess = "1";
             }
             END = true;
         }
     }
     catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
     Dummy.LeftSideAccess  = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionRightSideFx(Dummy.LeftSideAccess, COMMONSUBFACTOR, ref END, NOTFACTOR);
     Dummy.RightSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionRightSideFx(Dummy.RightSideAccess, COMMONSUBFACTOR, ref END, NOTFACTOR);
     return(Dummy);
 }
コード例 #4
0
        static AddToTree.Tree SimplifierCommonSubFactorActionLeftSideFx(AddToTree.Tree Dummy, AddToTree.Tree COMMONSUBFACTOR, ref bool END, AddToTreeTreeLinkList NOTFACTOR)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            if (Dummy.SampleAccess != "*")
            {
                if (NOTFACTOR.FINDTreeWithOutThreadConsideration(Dummy))
                {
                    return(Dummy);
                }
            }
            if (END)
            {
                return(Dummy);
            }
            if ((Dummy.ThreadAccess.SampleAccess == "*") && (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, COMMONSUBFACTOR)))
            {
                Dummy.SetLefTandRightCommonlySide(null, null);
                Dummy.SampleAccess = "1";
                END = true;
            }
            else
            if ((Dummy.ThreadAccess.SampleAccess == "^") && (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.ThreadAccess.LeftSideAccess, COMMONSUBFACTOR)) && (IS.IsNumber(Dummy.ThreadAccess.RightSideAccess.SampleAccess)))
            {
                float NUM = (float)System.Convert.ToDouble(Dummy.ThreadAccess.RightSideAccess.SampleAccess);
                NUM = NUM - 1;
                if (NUM > 0)
                {
                    Dummy.ThreadAccess.RightSideAccess.SampleAccess = NUM.ToString();
                }
                else
                {
                    Dummy.SetLefTandRightCommonlySide(null, null);
                    Dummy.SampleAccess = "1";
                }
                END = true;
            }

            Dummy.LeftSideAccess  = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionLeftSideFx(Dummy.LeftSideAccess, COMMONSUBFACTOR, ref END, NOTFACTOR);
            Dummy.RightSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionLeftSideFx(Dummy.RightSideAccess, COMMONSUBFACTOR, ref END, NOTFACTOR);
            return(Dummy);
        }
コード例 #5
0
        static public bool IsNotUpperPowerOfNodeInList(AddToTree.Tree Dummy, AddToTreeTreeLinkList AbaledFactors, ref float PowerExsistNumber)
        {
            bool Is = false;

            AddToTree.Tree AbaledNode = new AddToTree.Tree(null, false);
            bool           OPERATION  = false;

            while (!(AbaledFactors.ISEmpty()))
            {
                AbaledNode = AbaledFactors.DELETEFromTreeFirstNode();
                if (AbaledNode.SampleAccess == "^")
                {
                    if (Dummy.SampleAccess == "^")
                    {
                        if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess))
                        {
                            if (IS.IsNumber(AbaledNode.RightSideAccess.SampleAccess))
                            {
                                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.LeftSideAccess, AbaledNode.LeftSideAccess))
                                {
                                    float NumDummy  = (float)(System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess));
                                    float NumAbaled = (float)(System.Convert.ToDouble(AbaledNode.RightSideAccess.SampleAccess));
                                    if (NumAbaled < NumDummy)
                                    {
                                        Is = true;
                                    }
                                    PowerExsistNumber = NumAbaled;
                                    OPERATION         = true;
                                    break;
                                }
                            }
                        }
                    }
                }
            }
            if (AbaledFactors.ISEmpty() || (!OPERATION))
            {
                Is = true;
            }
            return(Is);
        }
コード例 #6
0
        public AddToTree.Tree DELETEFromTreeFindedNode(AddToTree.Tree DummyToDeleted)
        {
            AddToTree.Tree RETURN = null;
            if (Node != null)
            {
                if (!ISEmpty())
                {
                    try
                    {
                        LinkListNodeClass Dummy = Node;

                        while ((Dummy != null) && (!(EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.CurrentAccess, DummyToDeleted))))
                        {
                            Dummy = Dummy.NextAccess;
                        }
                        if (Dummy != null)
                        {
                            if (Dummy.NextAccess != null)
                            {
                                Dummy.NextAccess.ThreadAccess = Dummy.ThreadAccess;
                            }
                            Dummy = Dummy.NextAccess;
                        }
                        SetNode(Dummy);
                        CurrentSize--;
                    }
                    catch (NullReferenceException t)
                    {
                        ExceptionClass.ExceptionClassMethod(t);
                        //       System.Windows.Forms.MessageBox.Show("Invalide Deletion Finded Node.");
                    }
                }
            }
            else
            {
                CurrentSize = -1;
            }
            return(RETURN);
        }
コード例 #7
0
        public bool FINDTreeWithOutThreadConsideration(AddToTree.Tree Dummy)
        {
            LinkListNodeClass Tracer = Node;

            try
            {
            }
            catch (NullReferenceException k) { ExceptionClass.ExceptionClassMethod(k); }
            bool Is = false;

            while (Tracer != null)
            {
                if (Tracer.CurrentAccess != null)
                {
                    if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, Tracer.CurrentAccess))
                    {
                        Is = true;
                        break;
                    }
                }
                Tracer = Tracer.NextAccess;
            }
            return(Is);
        }
コード例 #8
0
        private AddToTree.Tree Solver()
        {
            UknownIntegralSolver UNKNOWN = this;

            this.SetProgressValue(progressBar1, 0);

            int INCREASE = 2147483647 / 10;

            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);


            //ERRORCUASE1715 :ERRROR cause of ERROR317142.the copy operation is not valid.
            //ERROR3175 :Error in data structure .
            //ERRORCAUSE0981243  ;The cause ERROR3175 of  is at here.Error on copy tree.refer to page 177.
            if (Enterface.SenderAccess.AutoSenderAccess.NodeAccess.SampleAccess == null && Enterface.SenderAccess.AutoSenderAccess != null)
            {
                Enterface.SenderAccess.AutoSenderAccess.NodeAccess = new AddToTree.Tree(Enterface.SenderAccess.AutoSenderAccess.CurrentStirngAccess, false);
            }
            AddToTree.Tree Copy = Enterface.SenderAccess.AutoSenderAccess.NodeAccess.CopyNewTree(Enterface.SenderAccess.AutoSenderAccess.NodeAccess);
            //Copy = TransmisionToDeleteingMinusPluse.TrasmisionToDeleteingMinusPluseFx(Copy);
            //ERROR918243 :The error at splitation.refer to page 176.
            //Copy = TransmisionToDeleteingMinusPluse.TrasmisionToDeleteingMinusPluseFx(Copy);

            AddToTree.Tree CopyNode = null;
            CopyNode = Copy.CopyNewTree(Copy);
            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);

            Copy = DeleteingMinusPluseTree.DeleteingMinusPluseFx(Copy);

            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);

            Copy = Spliter.SpliterFx(Copy, ref UNKNOWN);

            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);

            Copy = Simplifier.ArrangmentForSpliter(Copy);
            //ERROR30175541  :SIMPLIFIER HAS CUASED TO SOME ERRRO.refer to page 176.
            //ERROR312317 & ERRROR317140 :Error in simplification.refer to page 182.

            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);

            //Copy = Simplifier.SimplifierFx(Copy,ref UNKNOWN);
            //ERROR30174213  :The Simplified is invalid here.refer to page 180.
            //Copy = Derivasion.DerivasionOfFX(Copy);

            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);

            Copy = Integral.IntegralOfFX(Copy, ref UNKNOWN);

            /*int i = 0;
             * while (true)new AddToTree.Tree(null, false);
             * {
             *  //Copy = Integral.DervisionI(i, Copy);
             *  //ERROR981273987 :The error at derivation.refer to page 205.
             *   Copy = Derivasion.DerivasionOfFX(Copy);
             *  //ERROR3017181920 :refer to page 188.
             *
             *  Copy=Simplifier.SimplifierFx(Copy);
             *  i++;
             * }
             */

            //LOCATION13174253. refer to page 208.
            //ERROR3070405060 :The error is here.refer to page 220.
            //int NUM1 = Integral.NumberOfElements(Copy);
            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);

            int NUM1 = Integral.NumberOfElements(Copy);

            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);

            Copy = Simplifier.SimplifierFx(Copy, ref UNKNOWN);

            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);

            int NUM2 = Integral.NumberOfElements(Copy);

            this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);

            //Copy = RoundTree.RoundTreeMethod(Copy,0);

            Copy.ThreadAccess = null;
            Thread t = new Thread(new ThreadStart(Verifing));

            t.Start();
            //ERRORCORECTION6646464654643211:The Verification Return Valid result:1394/4/9
            if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Simplifier.SimplifierFx(RoundTree.RoundTreeMethod(ChangeFunction.ChangeFunctionFx(Derivasion.DerivasionOfFX(Copy.CopyNewTree(Copy), ref UNKNOWN), ref UNKNOWN), RoundTree.MaxFractionalDesimal(CopyNode)), ref UNKNOWN), CopyNode))
            {
                t.Abort();
                SetLableValue(label17, "Verifing finished.Integral Answer Calculated is :");
                MessageBox.Show("Verify OK");
            }
            else
            {
                t.Abort();
                SetLableValue(label17, "Verifing finished.Integral Answer Calculated is :");
                MessageBox.Show("Verify Failed.");
            }

            return(Copy);

            //this.SetProgressValue(progressBar1, this.progressBar1.Value + INCREASE);
        }
コード例 #9
0
        static AddToTree.Tree SplitationAllowedCalculator(AddToTree.Tree Dummy, AddToTree.Tree UNDER, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            if ((Dummy.ThreadAccess.SampleAccess == "/") || (Dummy.ThreadAccess.SampleAccess == "*"))
            {
                AddToTreeTreeLinkList ELEMENTS = FactorActivation.GetBigestCommonFactor(UNDER.CopyNewTree(UNDER), ref UIS);

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

                while (!(ELEMENTS.ISEmpty()))
                {
                    UNDERDummy = ELEMENTS.DELETEFromTreeFirstNode();
                    if ((Dummy.SampleAccess == "+") && (IS.IsPluSinNode(UNDERDummy)) && (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, UNDERDummy)))
                    {
                        Dummy.SplitableAccess = false;
                    }
                }
            }
            else
            {
                return(Dummy);
            }
            Dummy.LeftSideAccess  = SplitationAllowed.SplitationAllowedCalculator(Dummy.LeftSideAccess, UNDER, ref UIS);
            Dummy.RightSideAccess = SplitationAllowed.SplitationAllowedCalculator(Dummy.RightSideAccess, UNDER, ref UIS);
            return(Dummy);
        }
コード例 #10
0
        static AddToTree.Tree SuitableToSimplifierLocalThatToSimplifiedLocatedAtRight(AddToTree.Tree Dummy, AddToTree.Tree ToSimplified, ref bool Suitable, ref bool DivTrueMulFalse, ref bool SimplifiedTrueOtherWiseFalse)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            try
            {
                if (IS.IsMul(Dummy.SampleAccess))
                {
                    //if (Dummy.FINDTreeWithThreadConsideration(ToSimplified, Dummy.LeftSideAccess) == null)
                    if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.LeftSideAccess, ToSimplified))
                    {
                        try
                        {
                            if ((ToSimplified.ThreadAccess.SampleAccess == "/") && (Dummy.SampleAccess == "*"))
                            {
                                SimplifiedTrueOtherWiseFalse = true;
                                DivTrueMulFalse = true;
                                //LOCATION81726487 :refer to page 265.
                                AddToTree.Tree HOLDER = Dummy.CopyNewTree(Dummy);
                                //Dummy = Dummy.ThreadAccess;

                                /*if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess,HOLDER))
                                 * {
                                 *  Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                                 *  Dummy.RightSideAccess.SampleAccess = "1";
                                 * }
                                 * else
                                 */
                                //if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess,HOLDER))
                                //{
                                Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                Dummy.LeftSideAccess.SampleAccess = "1";
                                //}
                            }

                            /*else
                             * if ((ToSimplified.ThreadAccess.SampleAccess == "*") && (Dummy.ThreadAccess.SampleAccess == "/"))
                             * {
                             *    SimplifiedTrueOtherWiseFalse = true;
                             *    DivTrueMulFalse = false;
                             *    //LOCATION81987526487 :refer to page 265.
                             *    AddToTree.Tree HOLDER = Dummy.CopyNewTree(Dummy);
                             *    //Dummy = Dummy.ThreadAccess;
                             *    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess, HOLDER))
                             *    {
                             *        Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                             *        Dummy.RightSideAccess.SampleAccess = "1";
                             *    }
                             *    else
                             *        if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                             *        {
                             *            Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                             *            Dummy.LeftSideAccess.SampleAccess = null;
                             *        }
                             *
                             *
                             * }*/
                        }
                        catch (NullReferenceException t)
                        { ExceptionClass.ExceptionClassMethod(t); }
                    }
                    else
                    //if (Dummy.FINDTreeWithThreadConsideration(ToSimplified, Dummy.RightSideAccess) == null)
                    if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.RightSideAccess, ToSimplified))
                    {
                        try
                        {
                            if ((ToSimplified.ThreadAccess.SampleAccess == "/") && (Dummy.SampleAccess == "*"))
                            {
                                SimplifiedTrueOtherWiseFalse = true;
                                DivTrueMulFalse = true;
                                //LOCATION81726487 :refer to page 265.
                                AddToTree.Tree HOLDER = Dummy.CopyNewTree(Dummy);
                                Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                                Dummy.RightSideAccess.SampleAccess = "1";
                                Suitable = true;
                            }
                        }
                        catch (NullReferenceException t)
                        { ExceptionClass.ExceptionClassMethod(t); }
                    }
                    Suitable = true;
                }
                else
                {
                    return(Dummy);
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            LocalSearchMulDivisionEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtRight(Dummy.LeftSideAccess, ToSimplified, ref Suitable, ref DivTrueMulFalse, ref SimplifiedTrueOtherWiseFalse);
            LocalSearchMulDivisionEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtRight(Dummy.RightSideAccess, ToSimplified, ref Suitable, ref DivTrueMulFalse, ref SimplifiedTrueOtherWiseFalse);
            return(Dummy);
        }
コード例 #11
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);
        }
コード例 #12
0
        static AddToTree.Tree AddingSameUnderElementsActionReciverFx(AddToTree.Tree Node, AddToTree.Tree Dummy, AddToTree.Tree DummySender, ref bool CllingRightTrueLeftFalse, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            try
            {
                if ((IS.IsPluSinNode(Dummy)))
                {
                    CllingRightTrueLeftFalse = false;
                    Dummy.LeftSideAccess     = AddingSameUnderElements.AddingSameUnderElementsActionReciverFx(Node, Dummy.LeftSideAccess, DummySender, ref CllingRightTrueLeftFalse, ref UIS);
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            try
            {
                if ((IS.IsPluSinNode(Dummy)))
                {
                    CllingRightTrueLeftFalse = true;
                    Dummy.RightSideAccess    = AddingSameUnderElements.AddingSameUnderElementsActionReciverFx(Node, Dummy.RightSideAccess, DummySender, ref CllingRightTrueLeftFalse, ref UIS);
                }
            }                        catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }

            bool CurrentSimplification = false;

            AddToTree.Tree Befor    = Dummy.CopyNewTree(Dummy);
            int            INCREASE = 2147483647 / 3;

            try
            {
                UIS.SetProgressValue(UIS.progressBar16, 0);

                if (((Dummy.ThreadAccess == null) || (Dummy.ThreadAccess.SampleAccess == "+")) && (((Dummy.SampleAccess == "/"))) && ((EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.RightSideAccess, DummySender.RightSideAccess))) && ((!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, DummySender)))))
                {
                    AddToTree.Tree ADD = new AddToTree.Tree("+", false);
                    AddToTree.Tree Div = new AddToTree.Tree("/", false);
                    ADD.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess), DummySender.CopyNewTree(DummySender.LeftSideAccess));
                    ADD.LeftSideAccess.ThreadAccess  = ADD;
                    ADD.RightSideAccess.ThreadAccess = ADD;
                    Div.SetLefTandRightCommonlySide(ADD, Dummy.CopyNewTree(Dummy.RightSideAccess));
                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy))
                    {
                        Dummy                 = Dummy.ThreadAccess;
                        Div.ThreadAccess      = Dummy;
                        Dummy.RightSideAccess = Div;
                    }
                    else
                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.LeftSideAccess, Dummy))
                    {
                        Dummy                = Dummy.ThreadAccess;
                        Div.ThreadAccess     = Dummy;
                        Dummy.LeftSideAccess = Div;
                    }
                    //AddToTree.Tree HOLDER = Dummy.CopyReferenclyTree(Dummy);
                    AddToTree.Tree HOLDER = Dummy.CopyReferenclyTree(Dummy);

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

                    Node = Dummy.CopyReferenclyTree(Dummy);
                    while (Node.ThreadAccess != null)
                    {
                        Node = Node.ThreadAccess;
                    }

                    Dummy = Dummy.FINDTreeWithOutThreadConsideration(Node, DummySender);

                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy))
                    {
                        Dummy = Dummy.ThreadAccess;
                        Dummy.LeftSideAccess.ThreadAccess = Dummy.ThreadAccess;
                        Dummy = Dummy.LeftSideAccess;
                    }
                    else
                    if (Dummy.ThreadAccess.LeftSideAccess != null && EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.LeftSideAccess, Dummy))
                    {
                        Dummy = Dummy.ThreadAccess;
                        Dummy.RightSideAccess.ThreadAccess = Dummy.ThreadAccess;
                        Dummy = Dummy.RightSideAccess;
                    }
                    //Node = AddingSameUnderElements.OptimizeNode(Dummy);

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

                    Node = Dummy.CopyReferenclyTree(Dummy);
                    while (Node.ThreadAccess != null)
                    {
                        Node = Node.ThreadAccess;
                    }

                    if (!(EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Node)))
                    {
                        Dummy = Dummy.FINDTreeWithOutThreadConsideration(HOLDER, Node);
                    }

                    CurrentSimplification = true;
                }
                else
                {
                    UIS.SetProgressValue(UIS.progressBar16, 2147483647);
                    //if(!CurrentSimplification)
                    //  Dummy = Dummy.FINDTreeWithThreadConsideration(Befor,Dummy);
                    return(Dummy);
                }
                if (CurrentSimplification)
                {
                    Dummy = SimplifierCommonSubFactor.SimplifierCommonSubFactorFx(Dummy, ref UIS);
                    Dummy = LocalSimplifier.LocalSimplifierFx(Dummy, ref UIS);
                }
                if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Befor))
                {
                    UIS.SetProgressValue(UIS.progressBar16, 2147483647);
                    return(Dummy);
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar16, 2147483647);
            return(Dummy);
        }