Пример #1
0
        static AddToTree.Tree FactorActivationFirstMinuseOrPluseFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }

            if ((FactorActivation.SuitableForFactorActivation(Dummy.CopyNewTree(Dummy))) && ((Dummy.SampleAccess == "+") || (Dummy.SampleAccess == "-")))
            {
                FactorActivation.FactorActivationOnlyMuLnodesListedFx(Dummy.CopyNewTree(Dummy));
                Dummy = FactorActivation.FactorActivationActionFx(Dummy, ref UIS);
            }
            while (!(NotAbledFactors.ISEmpty()))
            {
                NotAbledFactors.DELETEFromTreeFirstNode();
            }
            while (!(AbledFactors.ISEmpty()))
            {
                AbledFactors.DELETEFromTreeFirstNode();
            }
            while (!(ONLYMULnODE.ISEmpty()))
            {
                ONLYMULnODE.DELETEFromTreeFirstNode();
            }
            while (!(MULATEDELEMENTS.ISEmpty()))
            {
                MULATEDELEMENTS.DELETEFromTreeFirstNode();
            }
            Dummy.LeftSideAccess  = FactorActivation.FactorActivationFirstMinuseOrPluseFx(Dummy.LeftSideAccess, ref UIS);
            Dummy.RightSideAccess = FactorActivation.FactorActivationFirstMinuseOrPluseFx(Dummy.RightSideAccess, ref UIS);
            return(Dummy);
        }
Пример #2
0
        static AddToTree.Tree ConvertAllMinuseToPluseActionFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            int  INCREASE = 2147483647 / 3;
            bool SecOND   = true;

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

                if ((Dummy.ThreadAccess.SampleAccess == "-") && (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy)))
                {
                    AddToTree.Tree ONE = new AddToTree.Tree("-1", false);
                    AddToTree.Tree ADD = new AddToTree.Tree("*", false);
                    //Dummy = Dummy.LeftSideAccess;
                    ADD.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess), ONE);
                    ADD.LeftSideAccess.ThreadAccess  = ADD;
                    ADD.RightSideAccess.ThreadAccess = ADD;
                    Dummy = Dummy.ThreadAccess;
                    Dummy.SampleAccess   = "+";
                    Dummy.LeftSideAccess = ADD;
                    Dummy.LeftSideAccess.ThreadAccess = Dummy;
                    SecOND = false;
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar5, INCREASE + UIS.progressBar5.Value);

            try
            {
                if ((Dummy.SampleAccess == "-") && (SecOND))
                {
                    AddToTree.Tree ONE = new AddToTree.Tree("-1", false);
                    AddToTree.Tree ADD = new AddToTree.Tree("*", false);
                    ADD.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess), ONE);
                    ADD.LeftSideAccess.ThreadAccess  = ADD;
                    ADD.RightSideAccess.ThreadAccess = ADD;
                    Dummy.SampleAccess    = "+";
                    Dummy.RightSideAccess = ADD;
                    Dummy.RightSideAccess.ThreadAccess = Dummy;
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar5, 2147483647);
            Dummy.LeftSideAccess  = ConvertAllMinuseToPluse.ConvertAllMinuseToPluseActionFx(Dummy.LeftSideAccess, ref UIS);
            Dummy.RightSideAccess = ConvertAllMinuseToPluse.ConvertAllMinuseToPluseActionFx(Dummy.RightSideAccess, ref UIS);
            return(Dummy);
        }
Пример #3
0
        static public AddToTree.Tree KnownIntegralFormullaFx(AddToTree.Tree Dummy)
        {
            try
            {
                if ((Dummy.LeftSideAccess != null) && (Dummy.RightSideAccess != null) && (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess)) && (Dummy.SampleAccess == "/") && (Dummy.RightSideAccess.SampleAccess == "x"))
                {
                    AddToTree.Tree Ln = new AddToTree.Tree("Ln", false);
                    Ln.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess), null);
                    Ln.LeftSideAccess.ThreadAccess = Ln;


                    Ln.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess), Ln.CopyNewTree(Ln));
                    Ln.LeftSideAccess.ThreadAccess  = Ln;
                    Ln.RightSideAccess.ThreadAccess = Ln;
                    Ln.SampleAccess = "*";

                    Dummy = Ln;
                }
                else
                if ((Dummy.LeftSideAccess.SampleAccess.ToLower() == "x") && (Dummy.RightSideAccess == null) && (Dummy.SampleAccess.ToLower() == "ln"))
                {
                    AddToTree.Tree Ln = new AddToTree.Tree("Ln", false);
                    AddToTree.Tree X  = new AddToTree.Tree("X", false);

                    Ln.SetLefTandRightCommonlySide(X.CopyNewTree(X), null);
                    Ln.LeftSideAccess.ThreadAccess = Ln;


                    Ln.SetLefTandRightCommonlySide(X.CopyNewTree(X), Ln.CopyNewTree(Ln));
                    Ln.LeftSideAccess.ThreadAccess  = Ln;
                    Ln.RightSideAccess.ThreadAccess = Ln;
                    Ln.SampleAccess = "*";

                    Ln.SetLefTandRightCommonlySide(Ln.CopyNewTree(Ln), X);
                    Ln.LeftSideAccess.ThreadAccess  = Ln;
                    Ln.RightSideAccess.ThreadAccess = Ln;
                    Ln.SampleAccess = "-";

                    Dummy = Ln;
                }
                else
                if (true)
                {
                    Dummy = null;
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); Dummy = null; }
            return(Dummy);
        }
 static AddToTree.Tree SuitableStructureForLocalSimplifierFxNumberSorter(AddToTree.Tree Dummy)
 {
     if (Dummy == null)
     {
         return(Dummy);
     }
     if (Dummy.SampleAccess == "*")
     {
         if (!IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
         {
             if (Dummy.RightSideAccess.SampleAccess == "*")
             {
                 if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                 {
                     AddToTree.Tree HOLDER = Dummy.CopyNewTree(Dummy.LeftSideAccess);
                     Dummy.LeftSideAccess = Dummy.CopyNewTree(Dummy.RightSideAccess.LeftSideAccess);
                     Dummy.LeftSideAccess.ThreadAccess = Dummy;
                     Dummy = Dummy.RightSideAccess;
                     Dummy.LeftSideAccess = HOLDER;
                     Dummy.LeftSideAccess.ThreadAccess = Dummy;
                     Dummy = Dummy.ThreadAccess;
                 }
             }
         }
     }
     if (Dummy.SampleAccess == "*")
     {
         if (!IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
         {
             if (Dummy.RightSideAccess.SampleAccess == "*")
             {
                 if (IS.IsNumber(Dummy.RightSideAccess.RightSideAccess.SampleAccess))
                 {
                     AddToTree.Tree HOLDER = Dummy.CopyNewTree(Dummy.LeftSideAccess);
                     Dummy.LeftSideAccess = Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess);
                     Dummy.LeftSideAccess.ThreadAccess = Dummy;
                     Dummy = Dummy.RightSideAccess;
                     Dummy.RightSideAccess = HOLDER;
                     Dummy.RightSideAccess.ThreadAccess = Dummy;
                     Dummy = Dummy.ThreadAccess;
                 }
             }
         }
     }
     Dummy.LeftSideAccess  = SuitableStructureForLocalSimplifier.SuitableStructureForLocalSimplifierFxNumberSorter(Dummy.LeftSideAccess);
     Dummy.RightSideAccess = SuitableStructureForLocalSimplifier.SuitableStructureForLocalSimplifierFxNumberSorter(Dummy.RightSideAccess);
     return(Dummy);
 }
Пример #5
0
        static public bool IsEqualWithOutThreadConsiderationByDivision(AddToTree.Tree T1, AddToTree.Tree T2, ref UknownIntegralSolver UIS)
        {
            bool Is = false;

            AddToTree.Tree Code = new AddToTree.Tree("/", false);
            Code.SetLefTandRightCommonlySide(T1.CopyNewTree(T1), T2.CopyNewTree(T2));
            try
            {
                Code.LeftSideAccess.ThreadAccess = Code;
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            try
            {
                Code.RightSideAccess.ThreadAccess = Code;
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }

            Code = Simplifier.SimplifierFx(Code, ref UIS);



            if ((Code.SampleAccess == "1") && (Code.LeftSideAccess == null) && (Code.RightSideAccess == null))
            {
                Is = true;
            }

            return(Is);
        }
Пример #6
0
 static AddToTree.Tree MinuseToPluSeconverterActionFx(AddToTree.Tree Dummy)
 {
     if (Dummy == null)
     {
         return(null);
     }
     try
     {
         if (Dummy.SampleAccess == "-")
         {
             if (Dummy.ThreadAccess.SampleAccess == "-")
             {
                 if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy))
                 {
                     Dummy.ThreadAccess.SampleAccess = "+";
                     AddToTree.Tree CONVERT = new AddToTree.Tree("*", false);
                     AddToTree.Tree Minuse  = new AddToTree.Tree("-1", false);
                     CONVERT.SetLefTandRightCommonlySide(Minuse, Dummy.CopyNewTree(Dummy.LeftSideAccess));
                     CONVERT.LeftSideAccess.ThreadAccess  = CONVERT;
                     CONVERT.RightSideAccess.ThreadAccess = CONVERT;
                     CONVERT.ThreadAccess = Dummy;
                     Dummy.LeftSideAccess = CONVERT;
                 }
             }
         }
     }
     catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
     MinuseToPluSeconverter.MinuseToPluSeconverterActionFx(Dummy.LeftSideAccess);
     MinuseToPluSeconverter.MinuseToPluSeconverterActionFx(Dummy.RightSideAccess);
     return(Dummy);
 }
Пример #7
0
        static AddToTree.Tree FactorActivationActionFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            //ERROR932875987 : Refer to page 301 :If The Non Copy of Dummy Passes to method the result of dummy become invalid.
            //AddToTree.Tree Factor = FactorActivation.GetBigestCommonFactor(Dummy.CopyNewTree(Dummy));
            AddToTreeTreeLinkList FactorLinkList = FactorActivation.GetBigestCommonFactor(Dummy.CopyNewTree(Dummy), ref UIS);
            bool Action = false;
            bool Mul    = false;

            if (!(FactorLinkList.ISEmpty()))
            {
                AddToTree.Tree Factor = new AddToTree.Tree(null, false);
                //ERROR293846210394 :The effection of Thread is not act on thread.
                //AddToTree.Tree Holder = Dummy.CopyNewTree(Dummy.ThreadAccess);
                //ERROCORECTION91827831294 :The thread validation is corrected.refer to page 335.
                AddToTree.Tree Holder = Dummy.ThreadAccess;

                bool LeftTrueRightFalse = false;
                try
                {
                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy))
                    {
                        LeftTrueRightFalse = false;
                    }
                    else
                    {
                        LeftTrueRightFalse = true;
                    }
                }
                catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }

                Dummy.ThreadAccess = null;

                while (!(FactorLinkList.ISEmpty()))
                {
                    Factor = FactorLinkList.DELETEFromTreeFirstNode();
                    Dummy  = FactorActivation.FactorActivationDivActionFx(Dummy.CopyNewTree(Dummy), Factor, ref Action, ref Mul, FactorLinkList.CopyLinkList());
                }
                while (Dummy.ThreadAccess != null)
                {
                    Dummy = Dummy.ThreadAccess;
                }
                Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);
                try
                {
                    if (!LeftTrueRightFalse)
                    {
                        Holder.RightSideAccess = Dummy;
                    }
                    else
                    {
                        Holder.LeftSideAccess = Dummy;
                    }
                }
                catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
                Dummy.ThreadAccess = Holder;
            }
            return(Dummy);
        }
 static public bool IntegralRecursiveMulatFGFx(AddToTreeTreeLinkList MulAtFG, AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
 {
     AddToTree.Tree HOLDER = MulAtFG.DELETEFromTreeFirstNode();
     if (Dummy != null)
     {
         return(EqualToObject.IsEqualWithOutThreadConsiderationByDivision(HOLDER.CopyNewTree(HOLDER), Dummy.CopyNewTree(Dummy), ref UIS));
     }
     return(false);
 }
 static AddToTree.Tree MinusPluseSorteStructureActionFx(AddToTree.Tree Dummy, ref bool Sorted)
 {
     if (Dummy == null)
     {
         return(Dummy);
     }
     if (!Sorted)
     {
         return(Dummy);
     }
     else
     {
         //if (Dummy.ThreadAccess == null)//LOCATION98124 : Refer to page 279.
         if (IS.IsMinuseOrPluse(Dummy.SampleAccess))
         {
             if (IS.IsMinuseOrPluse(Dummy.LeftSideAccess.SampleAccess))
             {
                 AddToTree.Tree Holder  = Dummy.CopyNewTree(Dummy.LeftSideAccess);
                 AddToTree.Tree Holder2 = Dummy.CopyNewTree(Dummy);
                 Dummy = Dummy.LeftSideAccess;
                 Dummy.RightSideAccess = Holder2;
                 Dummy.RightSideAccess.ThreadAccess = Dummy;
                 Dummy = Dummy.RightSideAccess;
                 Dummy.LeftSideAccess = Holder.RightSideAccess;
                 Dummy.LeftSideAccess.ThreadAccess = Dummy;
                 Dummy = Dummy.ThreadAccess;
                 Dummy.ThreadAccess = Holder.ThreadAccess;
             }
         }
         else
         {
             Sorted = false;
             return(Dummy);
         }
     }
     Dummy.LeftSideAccess  = MinusPluseSorteStructure.MinusPluseSorteStructureActionFx(Dummy.LeftSideAccess, ref Sorted);
     Dummy.RightSideAccess = MinusPluseSorteStructure.MinusPluseSorteStructureActionFx(Dummy.RightSideAccess, ref Sorted);
     return(Dummy);
 }
Пример #10
0
 static AddToTree.Tree AddingDivisionToThreeDivStructureActionFx(AddToTree.Tree Dummy)
 {
     if (Dummy == null)
     {
         return(Dummy);
     }
     if (Dummy.SampleAccess == "/")
     {
         if (Dummy.LeftSideAccess.SampleAccess == "/")
         {
             if (Dummy.RightSideAccess.SampleAccess != "/")
             {
                 AddToTree.Tree Div = new AddToTree.Tree("/", false);
                 AddToTree.Tree One = new AddToTree.Tree("1", false);
                 Div.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess), One);
                 Div.LeftSideAccess.ThreadAccess  = Div;
                 Div.RightSideAccess.ThreadAccess = Div;
                 Div.ThreadAccess      = Dummy;
                 Dummy.RightSideAccess = Div;
             }
         }
         if (Dummy.LeftSideAccess.SampleAccess != "/")
         {
             if (Dummy.RightSideAccess.SampleAccess == "/")
             {
                 AddToTree.Tree Div = new AddToTree.Tree("/", false);
                 AddToTree.Tree One = new AddToTree.Tree("1", false);
                 Div.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess), One);
                 Div.LeftSideAccess.ThreadAccess  = Div;
                 Div.RightSideAccess.ThreadAccess = Div;
                 Div.ThreadAccess     = Dummy;
                 Dummy.LeftSideAccess = Div;
             }
         }
     }
     Dummy.LeftSideAccess  = AddingDivisionToThreeDivStructure.AddingDivisionToThreeDivStructureActionFx(Dummy.LeftSideAccess);
     Dummy.RightSideAccess = AddingDivisionToThreeDivStructure.AddingDivisionToThreeDivStructureActionFx(Dummy.RightSideAccess);
     return(Dummy);
 }
Пример #11
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);
        }
Пример #12
0
 static AddToTree.Tree ReplacementXActionFx(AddToTree.Tree Dummy, AddToTree.Tree U)
 {
     if (Dummy == null)
     {
         return(Dummy);
     }
     AddToTree.Tree THREAD = Dummy.CopyNewTree(Dummy.ThreadAccess);
     if (Dummy.SampleAccess != null && Dummy.SampleAccess.ToLower() == "x")
     {
         Dummy = U.CopyNewTree(U);
         Dummy.ThreadAccess = THREAD;
         return(Dummy);
     }
     Dummy.LeftSideAccess  = ReplacementXActionFx(Dummy.LeftSideAccess, U);
     Dummy.RightSideAccess = ReplacementXActionFx(Dummy.RightSideAccess, U);
     return(Dummy);
 }
Пример #13
0
        static AddToTree.Tree FactorActivationDivActionFx(AddToTree.Tree Dummy, AddToTree.Tree Factor, ref bool Action, ref bool Mul, AddToTreeTreeLinkList CopyOfFactors)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            bool Current = false;

            try
            {
                if (Mul && Action && (IS.IsMinusAndPluseFirstNode(Dummy.ThreadAccess) && (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy))))
                {
                    Action = false;
                    Mul    = false;
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            if ((IS.IsMinusAndPluseFirstNode(Dummy)) && (!Mul) && ((Factor != null)))
            {
                AddToTree.Tree Copy = new AddToTree.Tree("*", false);
                Copy.SetLefTandRightCommonlySide(Factor.CopyNewTree(Factor), Dummy.CopyNewTree(Dummy));
                Copy.LeftSideAccess.ThreadAccess  = Copy;
                Copy.RightSideAccess.ThreadAccess = Copy;
                Copy.ThreadAccess = Dummy.ThreadAccess;
                Dummy             = Copy;
                Mul     = true;
                Current = true;
            }
            else//CAUSEDERROR2983747 :This Section because of Loss Factors not is not become one extra factors.
            {
                Dummy = FactorActivation.ConvertExtraFactorsTooneFx(Dummy, Factor, ref Action, Current);
            }

            if (Current)
            {
                Dummy = Dummy.RightSideAccess;
                //Dummy = Dummy.RightSideAccess;
                Current = false;
            }

            Dummy.LeftSideAccess  = FactorActivation.FactorActivationDivActionFx(Dummy.LeftSideAccess, Factor, ref Action, ref Mul, CopyOfFactors);
            Dummy.RightSideAccess = FactorActivation.FactorActivationDivActionFx(Dummy.RightSideAccess, Factor, ref Action, ref Mul, CopyOfFactors);

            return(Dummy);
        }
Пример #14
0
        static public AddToTree.Tree NumberDivMulFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            try
            {
                AddToTree.Tree THREAD = Dummy.CopyNewTree(Dummy.ThreadAccess);
                Dummy.ThreadAccess = null;

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

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

                Dummy.ThreadAccess = THREAD;
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            return(Dummy);
        }
Пример #15
0
        static AddToTree.Tree BesidesAverageActionFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            int INCREASE = 2147483647 / 4;

            UIS.SetProgressValue(UIS.progressBar8, 0);
            if (IS.IsDiv(Dummy.SampleAccess))
            {
                if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess) && IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
                {
                    AddToTree.Tree MUL = new AddToTree.Tree(null, false);
                    MUL = Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess);

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

                    Dummy.LeftSideAccess.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess));
                    Dummy.LeftSideAccess.SampleAccess = "*";
                    Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.LeftSideAccess;
                    Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;

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

                    Dummy.SampleAccess = "/";

                    Dummy.RightSideAccess.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess.LeftSideAccess), MUL);
                    Dummy.RightSideAccess.SampleAccess = "*";
                    Dummy.RightSideAccess.LeftSideAccess.ThreadAccess  = Dummy.RightSideAccess;
                    Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess;

                    UIS.SetProgressValue(UIS.progressBar8, INCREASE + UIS.progressBar8.Value);
                }
                UIS.SetProgressValue(UIS.progressBar8, 2147483647);

/*                else
 *                  if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess))
 *                  {
 *                      AddToTree.Tree MUL = new AddToTree.Tree(null, false);
 *                      MUL = Dummy.CopyNewTree(Dummy.RightSideAccess);
 *                      Dummy.RightSideAccess = Dummy.LeftSideAccess.RightSideAccess;
 *                      Dummy.RightSideAccess.ThreadAccess = Dummy;
 *
 *                      Dummy.SampleAccess = "/";
 *
 *                      Dummy.LeftSideAccess.RightSideAccess = MUL;
 *                      Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
 *                      Dummy.LeftSideAccess.SampleAccess = "*";
 *
 *
 *                  }
 *                  else
 *                      if (IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
 *                      {
 *                          Dummy.SetLefTandRightCommonlySide(Dummy.RightSideAccess, Dummy.LeftSideAccess);
 *
 *                          AddToTree.Tree MUL = new AddToTree.Tree(null, false);
 *                          MUL = Dummy.CopyNewTree(Dummy.RightSideAccess);
 *                          Dummy.RightSideAccess = Dummy.LeftSideAccess.RightSideAccess;
 *                          Dummy.RightSideAccess.ThreadAccess = Dummy;
 *
 *                          Dummy.SampleAccess = "/";
 *
 *                          Dummy.LeftSideAccess.RightSideAccess = MUL;
 *                          Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
 *                          Dummy.LeftSideAccess.SampleAccess = "*";
 *
 *
 *                      }
 */
            }
            Dummy.LeftSideAccess  = BesidesAverage.BesidesAverageActionFx(Dummy.LeftSideAccess, ref UIS);
            Dummy.RightSideAccess = BesidesAverage.BesidesAverageActionFx(Dummy.RightSideAccess, ref UIS);
            return(Dummy);
        }
Пример #16
0
        static public AddToTree.Tree RadicalUXFX()
        {
            AddToTree.Tree UX         = new AddToTree.Tree("UX", false);
            AddToTree.Tree UXFUNCTION = new AddToTree.Tree("/", false);

            AddToTree.Tree B                            = new AddToTree.Tree("b", false);
            AddToTree.Tree BPOWTOW                      = new AddToTree.Tree("b", false);
            AddToTree.Tree APOWTOW                      = new AddToTree.Tree("a", false);
            AddToTree.Tree BPOWTOWDIVAPOWTOW            = new AddToTree.Tree("/", false);
            AddToTree.Tree BPOWTOWDIVAPOWTOWMULXMINUSX0 = new AddToTree.Tree("*", false);
            AddToTree.Tree BPOWTOWMINUSEBPOWTOWDIVAPOWTOWMULXMINUSX0 = new AddToTree.Tree("-", false);
            AddToTree.Tree TOW      = new AddToTree.Tree("2", false);
            AddToTree.Tree POW      = new AddToTree.Tree("^", false);
            AddToTree.Tree A        = new AddToTree.Tree("a", false);
            AddToTree.Tree X0       = new AddToTree.Tree("X0", false);
            AddToTree.Tree X        = new AddToTree.Tree("X", false);
            AddToTree.Tree XMINUSX0 = new AddToTree.Tree("-", false);
            AddToTree.Tree DIV      = new AddToTree.Tree("/", false);
            UX.SetLefTandRightCommonlySide(UX, null);
            UX.LeftSideAccess.ThreadAccess  = UX;
            UX.RightSideAccess.ThreadAccess = UX;

            BPOWTOW.SetLefTandRightCommonlySide(BPOWTOW.CopyNewTree(BPOWTOW), TOW.CopyNewTree(TOW));
            BPOWTOW.LeftSideAccess.ThreadAccess  = BPOWTOW;
            BPOWTOW.RightSideAccess.ThreadAccess = BPOWTOW;

            APOWTOW.SetLefTandRightCommonlySide(APOWTOW.CopyNewTree(APOWTOW), TOW.CopyNewTree(TOW));
            APOWTOW.LeftSideAccess.ThreadAccess  = APOWTOW;
            APOWTOW.RightSideAccess.ThreadAccess = APOWTOW;


            BPOWTOWDIVAPOWTOW.SetLefTandRightCommonlySide(BPOWTOW.CopyNewTree(BPOWTOW), APOWTOW.CopyNewTree(APOWTOW));
            BPOWTOWDIVAPOWTOW.LeftSideAccess.ThreadAccess  = BPOWTOWDIVAPOWTOW;
            BPOWTOWDIVAPOWTOW.RightSideAccess.ThreadAccess = BPOWTOWDIVAPOWTOW;


            BPOWTOW.SetLefTandRightCommonlySide(BPOWTOW.CopyNewTree(BPOWTOW), TOW.CopyNewTree(TOW));
            BPOWTOW.LeftSideAccess.ThreadAccess  = BPOWTOW;
            BPOWTOW.RightSideAccess.ThreadAccess = BPOWTOW;
            BPOWTOW.SampleAccess = "*";


            APOWTOW.SetLefTandRightCommonlySide(APOWTOW.CopyNewTree(APOWTOW), TOW.CopyNewTree(TOW));
            APOWTOW.LeftSideAccess.ThreadAccess  = APOWTOW;
            APOWTOW.RightSideAccess.ThreadAccess = APOWTOW;
            APOWTOW.SampleAccess = "*";


            XMINUSX0.SetLefTandRightCommonlySide(X.CopyNewTree(X), X0.CopyNewTree(X0));
            XMINUSX0.LeftSideAccess.ThreadAccess  = XMINUSX0;
            XMINUSX0.RightSideAccess.ThreadAccess = XMINUSX0;

            XMINUSX0.SetLefTandRightCommonlySide(XMINUSX0.CopyNewTree(XMINUSX0), TOW.CopyNewTree(TOW));
            XMINUSX0.LeftSideAccess.ThreadAccess  = XMINUSX0;
            XMINUSX0.RightSideAccess.ThreadAccess = XMINUSX0;
            XMINUSX0.LeftSideAccess.ThreadAccess  = XMINUSX0;
            XMINUSX0.SampleAccess = "^";

            BPOWTOWDIVAPOWTOWMULXMINUSX0.SetLefTandRightCommonlySide(BPOWTOWDIVAPOWTOW, XMINUSX0);
            BPOWTOWDIVAPOWTOWMULXMINUSX0.LeftSideAccess.ThreadAccess  = BPOWTOWDIVAPOWTOWMULXMINUSX0;
            BPOWTOWDIVAPOWTOWMULXMINUSX0.RightSideAccess.ThreadAccess = BPOWTOWDIVAPOWTOWMULXMINUSX0;

            BPOWTOWMINUSEBPOWTOWDIVAPOWTOWMULXMINUSX0.SetLefTandRightCommonlySide(BPOWTOW.CopyNewTree(BPOWTOW), BPOWTOWDIVAPOWTOWMULXMINUSX0);
            BPOWTOWMINUSEBPOWTOWDIVAPOWTOWMULXMINUSX0.LeftSideAccess.ThreadAccess  = BPOWTOWMINUSEBPOWTOWDIVAPOWTOWMULXMINUSX0;
            BPOWTOWMINUSEBPOWTOWDIVAPOWTOWMULXMINUSX0.RightSideAccess.ThreadAccess = BPOWTOWMINUSEBPOWTOWDIVAPOWTOWMULXMINUSX0;


            UXFUNCTION.SetLefTandRightCommonlySide(BPOWTOW, BPOWTOWMINUSEBPOWTOWDIVAPOWTOWMULXMINUSX0);
            UXFUNCTION.LeftSideAccess.ThreadAccess  = UXFUNCTION;
            UXFUNCTION.RightSideAccess.ThreadAccess = UXFUNCTION;

            UX.SetLefTandRightCommonlySide(UXFUNCTION, null);
            UX.LeftSideAccess.ThreadAccess = UX;

            return(UX);
        }
        static AddToTree.Tree SuitableToSimplifierLocalThatToSimplifiedLocatedAtLeft(AddToTree.Tree Dummy, AddToTree.Tree ToSimplified, ref bool Suitable, ref bool MinuseTruePlusFalse, ref bool SimplifiedTrueOtherWiseFalse, ref float Num)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            AddToTree.Tree HOLDERCATCH = Dummy;
            try
            {
                if (IS.IsMinuseOrPluse(Dummy.SampleAccess))
                {
                    if ((EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess.RightSideAccess, ToSimplified.RightSideAccess)) && (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess)))
                    {
                        try
                        {
                            Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess);
                            //Dummy = Dummy.LeftSideAccess.RightSideAccess;
                            if ((ToSimplified.ThreadAccess == null) && (Dummy.SampleAccess == "-"))
                            {
                                SimplifiedTrueOtherWiseFalse = true;
                                MinuseTruePlusFalse          = true;
                                Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                Dummy.LeftSideAccess.SampleAccess = null;
                                //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 = null;
                                 * }
                                 * else
                                 *  if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                 *  {
                                 *      //        Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy;
                                 *      //      Dummy.LeftSideAccess = Dummy.LeftSideAccess.RightSideAccess;
                                 *      Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                 *      Dummy.LeftSideAccess.SampleAccess = null;
                                 *  }
                                 */
                                Suitable = true;
                                return(Dummy);
                            }
                            else
                            if ((ToSimplified.ThreadAccess != null) && (Dummy.SampleAccess == "-"))
                            {
                                if ((ToSimplified.ThreadAccess.SampleAccess == "+") && (Dummy.SampleAccess == "-"))
                                {
                                    SimplifiedTrueOtherWiseFalse = true;
                                    MinuseTruePlusFalse          = true;
                                    Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                    Dummy.LeftSideAccess.SampleAccess = null;
                                    //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 = null;
                                     *      }
                                     *      else
                                     *          if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                     *          {
                                     *              Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                     *              Dummy.LeftSideAccess.SampleAccess = null;
                                     *          }
                                     */
                                    Suitable = true;
                                    return(Dummy);
                                }
                                else
                                if ((ToSimplified.ThreadAccess != null) && (Dummy.SampleAccess == "+"))
                                {
                                    if ((ToSimplified.ThreadAccess.SampleAccess == "-") && (Dummy.SampleAccess == "+"))
                                    {
                                        SimplifiedTrueOtherWiseFalse = true;
                                        MinuseTruePlusFalse          = false;
                                        Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                        Dummy.LeftSideAccess.SampleAccess = null;
                                        //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 = null;
                                         * }
                                         * else
                                         *  if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                         *  {
                                         *      Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                         *      Dummy.LeftSideAccess.SampleAccess = null;
                                         *  }
                                         */
                                        Suitable = true;
                                        return(Dummy);
                                    }
                                    else
                                    if ((ToSimplified.ThreadAccess != null) && (Dummy.SampleAccess == "-"))
                                    {
                                        if ((ToSimplified.ThreadAccess.SampleAccess == "-") && (Dummy.SampleAccess == "-"))
                                        {
                                            SimplifiedTrueOtherWiseFalse = true;
                                            MinuseTruePlusFalse          = true;
                                            Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                            Dummy.LeftSideAccess.SampleAccess = null;
                                            //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 = null;
                                             *      }
                                             *      else
                                             *          if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                             *          {
                                             *              Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                             *              Dummy.LeftSideAccess.SampleAccess = null;
                                             *          }
                                             */
                                            Suitable = true;
                                            return(Dummy);
                                        }
                                    }
                                }
                            }
                        }

                        /*if (SimplifiedTrueOtherWiseFalse)
                         *  Dummy = Dummy.ThreadAccess;
                         * else
                         *  Dummy = Dummy.ThreadAccess.ThreadAccess;
                         * }
                         */
                        catch (NullReferenceException t) { Dummy = HOLDERCATCH;
                                                           ExceptionClass.ExceptionClassMethod(t); }
                    }
                    else
                    if ((EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess.RightSideAccess, ToSimplified.RightSideAccess)) & (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess)))
                    {
                        //Dummy.RightSideAccess.SampleAccess = null;
                        try
                        {
                            Num = (float)System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess);
                            //Dummy = Dummy.RightSideAccess.RightSideAccess;
                            if ((ToSimplified.ThreadAccess == null) && (Dummy.SampleAccess == "-"))
                            {
                                SimplifiedTrueOtherWiseFalse = true;
                                MinuseTruePlusFalse          = true;
                                Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                                Dummy.RightSideAccess.SampleAccess = null;
                                //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 = null;
                                 * }
                                 * else
                                 *  if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                 *  {
                                 *      Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                 *      Dummy.LeftSideAccess.SampleAccess = null;
                                 *  }
                                 */
                                Suitable = true;
                                return(Dummy);
                            }
                            else
                            if ((((ToSimplified.ThreadAccess != null))) && (ToSimplified.ThreadAccess.SampleAccess == "+") && (Dummy.SampleAccess == "-"))
                            {
                                SimplifiedTrueOtherWiseFalse = true;
                                MinuseTruePlusFalse          = true;
                                //LOCATION81987526487 :refer to page 265.

                                /*        AddToTree.Tree HOLDER = Dummy.CopyNewTree(Dummy);
                                 *      Dummy = Dummy.ThreadAccess;
                                 *      if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess, HOLDER))
                                 *      {
                                 *          Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy;
                                 *          Dummy.RightSideAccess = Dummy.RightSideAccess.LeftSideAccess;
                                 *      }
                                 *      else
                                 *          if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                 *          {
                                 *              Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                 *              Dummy.LeftSideAccess.SampleAccess = null;
                                 *          }
                                 */
                                Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                                Dummy.RightSideAccess.SampleAccess = null;
                                Suitable = true;
                                return(Dummy);
                            }
                            else
                            if ((((ToSimplified.ThreadAccess != null))) && (ToSimplified.ThreadAccess.SampleAccess == "-") && (Dummy.SampleAccess == "+"))
                            {
                                SimplifiedTrueOtherWiseFalse = true;
                                MinuseTruePlusFalse          = 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 = null;
                                 *              }
                                 *              else
                                 *                  if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                 *                  {
                                 *                      Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                 *                      Dummy.LeftSideAccess.SampleAccess = null;
                                 *                  }
                                 */
                                Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                                Dummy.RightSideAccess.SampleAccess = null;
                                Suitable = true;
                                return(Dummy);
                            }
                            else

                            if ((((ToSimplified.ThreadAccess != null))) && (ToSimplified.ThreadAccess.SampleAccess == "-") && (Dummy.SampleAccess == "-"))
                            {
                                SimplifiedTrueOtherWiseFalse = true;
                                MinuseTruePlusFalse          = true;
                                //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 = null;
                                 * }
                                 * else
                                 *  if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                 *  {
                                 *      Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                 *      Dummy.LeftSideAccess.SampleAccess = null;
                                 *  }
                                 */
                                Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                                Dummy.RightSideAccess.SampleAccess = null;
                                Suitable = true;
                                return(Dummy);
                            }

                            /*if (SimplifiedTrueOtherWiseFalse)
                             *  Dummy = Dummy.ThreadAccess;
                             * else
                             *  Dummy = Dummy.ThreadAccess.ThreadAccess;
                             */
                        }
                        catch (NullReferenceException t)
                        {
                            ExceptionClass.ExceptionClassMethod(t);
                            Dummy = HOLDERCATCH;
                        }
                    }
                }
                else
                {
                    return(Dummy);
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtLeft(Dummy.LeftSideAccess, ToSimplified, ref Suitable, ref MinuseTruePlusFalse, ref SimplifiedTrueOtherWiseFalse, ref Num);
            LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtLeft(Dummy.RightSideAccess, ToSimplified, ref Suitable, ref MinuseTruePlusFalse, ref SimplifiedTrueOtherWiseFalse, ref Num);
            return(Dummy);
        }
Пример #18
0
        static AddToTree.Tree DerivasionCalculator(AddToTree.Tree Node, AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Node == null)
            {
                return(Dummy);
            }
            if (Node.SampleAccess == "x")
            {
                Dummy.SampleAccess = "1";
                return(Dummy);
            }
            //ERROR317142 :The structure is ok.refer to page 155.

            //ERRORCORECTION30704012 :The error correced.refer to page 155.
            if (Node.LeftSideAccess != null)
            {
                if (Node.LeftSideAccess.LeftSideAccess == null)
                {
                    if (Node.LeftSideAccess.RightSideAccess == null)
                    {
                        if (IS.IsFunction(Node.SampleAccess))
                        {
                            Dummy = Derivasion.ConsTantFuctionDerivasion(Node);
                            return(Dummy);
                        }
                        else
                        if (IS.IsNumber(Dummy.SampleAccess))
                        {
                            Dummy = null;
                            return(Dummy);
                        }
                    }
                }
            }
            if (Node.SampleAccess == "/")
            {
                AddToTree.Tree Minuse = new AddToTree.Tree("-", false);
                AddToTree.Tree MulL   = new AddToTree.Tree("*", false);
                AddToTree.Tree MulR   = new AddToTree.Tree("*", false);
                AddToTree.Tree Power  = new AddToTree.Tree("^", false);
                AddToTree.Tree DFX    = new AddToTree.Tree(null, false);
                AddToTree.Tree DGX    = new AddToTree.Tree(null, false);
                AddToTree.Tree NRMulL = new AddToTree.Tree(null, false);
                AddToTree.Tree NRMulR = new AddToTree.Tree(null, false);
                AddToTree.Tree GX     = Node.CopyNewTree(Node.RightSideAccess);
                AddToTree.Tree IND    = new AddToTree.Tree("2", false);

                DFX    = Derivasion.DerivasionOfFX(Node.LeftSideAccess, ref UIS);
                NRMulL = Node.RightSideAccess;

                MulL.SetLefTandRightCommonlySide(DFX, NRMulL);
                MulL.LeftSideAccess.ThreadAccess  = MulL;
                MulL.RightSideAccess.ThreadAccess = MulL;

                DGX    = Derivasion.DerivasionOfFX(Node.RightSideAccess, ref UIS);
                NRMulR = Node.LeftSideAccess;

                MulR.SetLefTandRightCommonlySide(DGX, NRMulR);
                MulR.LeftSideAccess.ThreadAccess  = MulR;
                MulR.RightSideAccess.ThreadAccess = MulR;

                Minuse.SetLefTandRightCommonlySide(MulL, MulR);
                Minuse.LeftSideAccess.ThreadAccess  = Minuse;
                Minuse.RightSideAccess.ThreadAccess = Minuse;

                Power.SetLefTandRightCommonlySide(GX, IND);
                Power.LeftSideAccess.ThreadAccess  = Power;
                Power.RightSideAccess.ThreadAccess = Power;

                Dummy.SampleAccess = "/";
                Dummy.SetLefTandRightCommonlySide(Minuse, Power);
                Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                Dummy.RightSideAccess.ThreadAccess = Dummy;
            }
            else
            if (Node.SampleAccess == "*")
            {
                AddToTree.Tree MulL   = new AddToTree.Tree("*", false);
                AddToTree.Tree MulR   = new AddToTree.Tree("*", false);
                AddToTree.Tree DFX    = new AddToTree.Tree(null, false);
                AddToTree.Tree DGX    = new AddToTree.Tree(null, false);
                AddToTree.Tree NRMulL = new AddToTree.Tree(null, false);
                AddToTree.Tree NRMulR = new AddToTree.Tree(null, false);

                DFX = Derivasion.DerivasionOfFX(Node.LeftSideAccess, ref UIS);
                DGX = Derivasion.DerivasionOfFX(Node.RightSideAccess, ref UIS);

                NRMulL = Node.LeftSideAccess;
                NRMulR = Node.RightSideAccess;

                MulL.SetLefTandRightCommonlySide(DFX, NRMulR);
                MulL.LeftSideAccess.ThreadAccess = MulL;
                if (NRMulR.SampleAccess != null)
                {
                    MulL.RightSideAccess.ThreadAccess = MulL;
                }

                MulR.SetLefTandRightCommonlySide(Node.LeftSideAccess, DGX);
                MulR.LeftSideAccess.ThreadAccess = MulR;
                if (DGX.SampleAccess != null)
                {
                    MulR.RightSideAccess.ThreadAccess = MulR;
                }

                Dummy.SampleAccess = "+";
                Dummy.SetLefTandRightCommonlySide(MulL, MulR);
                Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                Dummy.RightSideAccess.ThreadAccess = Dummy;
            }
            else
            if (Node.SampleAccess == "-")
            {
                AddToTree.Tree DFX = new AddToTree.Tree(null, false);
                AddToTree.Tree DGX = new AddToTree.Tree(null, false);

                DFX = Derivasion.DerivasionOfFX(Node.LeftSideAccess, ref UIS);
                DGX = Derivasion.DerivasionOfFX(Node.RightSideAccess, ref UIS);

                Dummy.SampleAccess = "-";
                Dummy.SetLefTandRightCommonlySide(DFX, DGX);

                Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                Dummy.RightSideAccess.ThreadAccess = Dummy;
            }
            else
            if (Node.SampleAccess == "+")
            {
                AddToTree.Tree DFX = new AddToTree.Tree(null, false);
                AddToTree.Tree DGX = new AddToTree.Tree(null, false);

                DFX = Derivasion.DerivasionOfFX(Node.LeftSideAccess, ref UIS);
                DGX = Derivasion.DerivasionOfFX(Node.RightSideAccess, ref UIS);

                Dummy.SampleAccess = "+";
                Dummy.SetLefTandRightCommonlySide(DFX, DGX);

                Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                Dummy.RightSideAccess.ThreadAccess = Dummy;
            }
            else
            if (Node.SampleAccess == "^")
            {
                AddToTree.Tree ADD          = new AddToTree.Tree("+", false);
                AddToTree.Tree Copy         = Node.CopyNewTree(Node);
                AddToTree.Tree LnFX         = new AddToTree.Tree("Ln", false);
                AddToTree.Tree FXONE        = Node.CopyNewTree(Node.LeftSideAccess);
                AddToTree.Tree FXTOW        = Node.CopyNewTree(Node.LeftSideAccess);
                AddToTree.Tree GX           = Node.CopyNewTree(Node.RightSideAccess);
                AddToTree.Tree DFX          = new AddToTree.Tree(null, false);
                AddToTree.Tree DGX          = new AddToTree.Tree(null, false);
                AddToTree.Tree MulLevelTowL = new AddToTree.Tree("*", false);
                AddToTree.Tree MulLevelTowR = new AddToTree.Tree("*", false);
                AddToTree.Tree DIVThree     = new AddToTree.Tree("/", false);

                FXONE.ThreadAccess = null;
                DFX             = Derivasion.DerivasionOfFX(FXONE, ref UIS);
                GX.ThreadAccess = null;
                DGX             = Derivasion.DerivasionOfFX(GX, ref UIS);


                DIVThree.SetLefTandRightCommonlySide(DFX, FXONE);
                DIVThree.LeftSideAccess.ThreadAccess  = DIVThree;
                DIVThree.RightSideAccess.ThreadAccess = DIVThree;

                MulLevelTowR.SetLefTandRightCommonlySide(GX, DIVThree);
                MulLevelTowR.LeftSideAccess.ThreadAccess  = MulLevelTowR;
                MulLevelTowR.RightSideAccess.ThreadAccess = MulLevelTowR;

                LnFX.SetLefTandRightCommonlySide(FXTOW, null);
                LnFX.LeftSideAccess.ThreadAccess = LnFX;
                LnFX.RightSideAccess             = null;

                MulLevelTowL.SetLefTandRightCommonlySide(DGX, LnFX);
                MulLevelTowL.LeftSideAccess.ThreadAccess  = MulLevelTowL;
                MulLevelTowL.RightSideAccess.ThreadAccess = MulLevelTowL;

                ADD.SetLefTandRightCommonlySide(MulLevelTowL, MulLevelTowR);
                ADD.LeftSideAccess.ThreadAccess  = ADD;
                ADD.RightSideAccess.ThreadAccess = ADD;

                Dummy.SampleAccess = "*";
                Dummy.SetLefTandRightCommonlySide(Copy, ADD);
                Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                Dummy.RightSideAccess.ThreadAccess = Dummy;
            }
            else
            if (IS.IsFunction(Node.SampleAccess))
            {
                AddToTree.Tree DFoGX = Node.CopyNewTree(Node);
                AddToTree.Tree FX    = (Node);
                AddToTree.Tree GX    = Node.RightSideAccess;
                AddToTree.Tree DFX   = new AddToTree.Tree(null, false);
                AddToTree.Tree DGX   = new AddToTree.Tree(null, false);


                FX.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                FX.LeftSideAccess.SampleAccess = "x";

                DFX = Derivasion.DerivasionOfFX(FX, ref UIS);
                DGX = Derivasion.DerivasionOfFX(Node.LeftSideAccess, ref UIS);

                /*DFoGX.SetLefTandRightCommonlySide(DFX,null);
                 * DFoGX.SampleAccess = DFX.SampleAccess;
                 * DFoGX.LeftSideAccess.ThreadAccess = DFoGX;
                 * if(DFoGX.RightSideAccess!=null)
                 * DFoGX.RightSideAccess.ThreadAccess = DFoGX;
                 */
                DFoGX = Derivasion.ReplaceXToFX(DFX, Node.RightSideAccess);

                Dummy.SampleAccess = "*";
                Dummy.SetLefTandRightCommonlySide(DGX, DFoGX);
                Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                Dummy.RightSideAccess.ThreadAccess = Dummy;
            }
            return(Dummy);
        }
Пример #19
0
        static AddToTree.Tree  ChangeFunctionFxAction(AddToTree.Tree Dummy)
        {
            if (Dummy == null)
            {
                return(null);
            }
            if ((Dummy.SampleAccess == "^") && (Dummy.LeftSideAccess.SampleAccess.ToLower() == "sin") && (IS.IsNumber(Dummy.RightSideAccess.SampleAccess)))
            {
                AddToTree.Tree Cos = new AddToTree.Tree("Cos", false);
                AddToTree.Tree TOW = new AddToTree.Tree("2", false);
                AddToTree.Tree ONE = new AddToTree.Tree("1", false);

                float NUM = (float)System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess);
                if (NUM <= 1)
                {
                    return(Dummy);
                }
                NUM = NUM - 2;

                Cos.LeftSideAccess = new AddToTree.Tree(null, false);
                Cos.LeftSideAccess.ThreadAccess = Cos;

                Cos = Cos.LeftSideAccess;


                Cos.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), TOW.CopyNewTree(TOW));
                Cos.LeftSideAccess.ThreadAccess  = Cos;
                Cos.RightSideAccess.ThreadAccess = Cos;
                Cos.SampleAccess = "*";

                Cos = Cos.ThreadAccess;

                Cos.SetLefTandRightCommonlySide(ONE, Cos.CopyNewTree(Cos));
                Cos.LeftSideAccess.ThreadAccess  = Cos;
                Cos.RightSideAccess.ThreadAccess = Cos;
                Cos.SampleAccess = "-";

                Cos.SetLefTandRightCommonlySide(Cos.CopyNewTree(Cos), TOW);
                Cos.LeftSideAccess.ThreadAccess  = Cos;
                Cos.RightSideAccess.ThreadAccess = Cos;
                Cos.SampleAccess = "/";

                AddToTree.Tree HOLDER      = Dummy.CopyNewTree(Dummy.ThreadAccess);
                AddToTree.Tree HOLDERDummy = Dummy.CopyNewTree(Dummy.LeftSideAccess);
                AddToTree.Tree NUMDummy    = new AddToTree.Tree(null, false);
                if (NUM > 0)
                {
                    Dummy.LeftSideAccess = Cos;
                    Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.LeftSideAccess;
                    Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;

                    NUMDummy.SampleAccess = NUM.ToString();

                    HOLDERDummy.SetLefTandRightCommonlySide(HOLDERDummy.CopyNewTree(HOLDERDummy), NUMDummy);
                    HOLDERDummy.RightSideAccess.ThreadAccess = HOLDERDummy;
                    HOLDERDummy.LeftSideAccess.ThreadAccess  = HOLDERDummy;
                    HOLDERDummy.SampleAccess = "^";

                    Dummy.RightSideAccess = HOLDERDummy;
                    Dummy.RightSideAccess.ThreadAccess = Dummy;
                    Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                    Dummy.SampleAccess = "*";
                }
                else
                {
                    Dummy = Cos;
                }
                Dummy.ThreadAccess = HOLDER;
            }
            if ((Dummy.SampleAccess == "^") && (Dummy.LeftSideAccess.SampleAccess.ToLower() == "cos") && (IS.IsNumber(Dummy.RightSideAccess.SampleAccess)))
            {
                AddToTree.Tree Cos = new AddToTree.Tree("Cos", false);
                AddToTree.Tree TOW = new AddToTree.Tree("2", false);
                AddToTree.Tree ONE = new AddToTree.Tree("1", false);

                float NUM = (float)System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess);
                if (NUM <= 1)
                {
                    return(Dummy);
                }
                NUM = NUM - 2;

                Cos.LeftSideAccess = new AddToTree.Tree(null, false);
                Cos.LeftSideAccess.ThreadAccess = Cos;

                Cos = Cos.LeftSideAccess;


                Cos.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), TOW.CopyNewTree(TOW));
                Cos.LeftSideAccess.ThreadAccess  = Cos;
                Cos.RightSideAccess.ThreadAccess = Cos;
                Cos.SampleAccess = "*";

                Cos = Cos.ThreadAccess;

                Cos.SetLefTandRightCommonlySide(ONE, Cos.CopyNewTree(Cos));
                Cos.LeftSideAccess.ThreadAccess  = Cos;
                Cos.RightSideAccess.ThreadAccess = Cos;
                Cos.SampleAccess = "+";

                Cos.SetLefTandRightCommonlySide(Cos.CopyNewTree(Cos), TOW);
                Cos.LeftSideAccess.ThreadAccess  = Cos;
                Cos.RightSideAccess.ThreadAccess = Cos;
                Cos.SampleAccess = "/";

                AddToTree.Tree HOLDER      = Dummy.CopyNewTree(Dummy.ThreadAccess);
                AddToTree.Tree HOLDERDummy = Dummy.CopyNewTree(Dummy.LeftSideAccess);
                AddToTree.Tree NUMDummy    = new AddToTree.Tree(null, false);
                if (NUM > 0)
                {
                    Dummy.LeftSideAccess = Cos;
                    Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.LeftSideAccess;
                    Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;

                    NUMDummy.SampleAccess = NUM.ToString();

                    HOLDERDummy.SetLefTandRightCommonlySide(HOLDERDummy.CopyNewTree(HOLDERDummy), NUMDummy);
                    HOLDERDummy.RightSideAccess.ThreadAccess = HOLDERDummy;
                    HOLDERDummy.LeftSideAccess.ThreadAccess  = HOLDERDummy;
                    HOLDERDummy.SampleAccess = "^";

                    Dummy.RightSideAccess = HOLDERDummy;
                    Dummy.RightSideAccess.ThreadAccess = Dummy;
                    Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                    Dummy.SampleAccess = "*";
                }
                else
                {
                    Dummy = Cos;
                }
                Dummy.ThreadAccess = HOLDER;
            }
            return(Dummy);
        }
Пример #20
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);
        }
Пример #21
0
 static AddToTree.Tree SuitableToSimplifierLocalThatToSimplifiedLocatedAtRight(AddToTree.Tree Dummy, AddToTree.Tree ToSimplified, out bool Suitable, out bool MinuseTruePlusFalse, out bool SimplifiedTrueOtherWiseFalse)
 {
     if (Dummy == null)
     {
         Suitable                     = false;
         MinuseTruePlusFalse          = false;
         SimplifiedTrueOtherWiseFalse = false;
         return(Dummy);
     }
     try
     {
         if (IS.IsMinuseOrPluse(Dummy.SampleAccess))
         {
             if (Dummy.FINDTreeWithThreadConsideration(ToSimplified, Dummy.LeftSideAccess) == null)
             {
                 if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, ToSimplified))
                 {
                     try
                     {
                         if ((ToSimplified.ThreadAccess.SampleAccess == "+") && (Dummy.SampleAccess == "-"))
                         {
                             SimplifiedTrueOtherWiseFalse = true;
                             MinuseTruePlusFalse          = 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 = null;
                             }
                             else
                             if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                             {
                                 Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                 Dummy.LeftSideAccess.SampleAccess = null;
                             }
                         }
                         else
                         if ((ToSimplified.ThreadAccess.SampleAccess == "-") && (Dummy.ThreadAccess.SampleAccess == "+"))
                         {
                             SimplifiedTrueOtherWiseFalse = true;
                             MinuseTruePlusFalse          = 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 = null;
                             }
                             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.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess, ToSimplified))
                     {
                         try
                         {
                             if ((ToSimplified.ThreadAccess.SampleAccess == "+") && (Dummy.SampleAccess == "-"))
                             {
                                 SimplifiedTrueOtherWiseFalse = true;
                                 MinuseTruePlusFalse          = 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 = null;
                                 }
                                 else
                                 if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                 {
                                     Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                     Dummy.LeftSideAccess.SampleAccess = null;
                                 }
                             }
                             else
                             if ((ToSimplified.ThreadAccess.SampleAccess == "-") && (Dummy.SampleAccess == "+"))
                             {
                                 SimplifiedTrueOtherWiseFalse = true;
                                 MinuseTruePlusFalse          = 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 = null;
                                 }
                                 else
                                 if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, HOLDER))
                                 {
                                     Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                                     Dummy.LeftSideAccess.SampleAccess = null;
                                 }
                             }
                         }
                         catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
                     }
                 }
             }
             Suitable = true;
         }
         else
         {
             Suitable                     = false;
             MinuseTruePlusFalse          = false;
             SimplifiedTrueOtherWiseFalse = false;
             return(Dummy);
         }
     }
     catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
     LocalSearchMinusPlusEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtRight(Dummy.LeftSideAccess, ToSimplified, out Suitable, out MinuseTruePlusFalse, out SimplifiedTrueOtherWiseFalse);
     LocalSearchMinusPlusEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtRight(Dummy.RightSideAccess, ToSimplified, out Suitable, out MinuseTruePlusFalse, out SimplifiedTrueOtherWiseFalse);
     return(Dummy);
 }
Пример #22
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);
        }
        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);
        }
        static AddToTree.Tree CommonFactorSimlificationActionFx(AddToTree.Tree Dummy, ref bool CONTINUE, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            Dummy.LeftSideAccess  = CommonFactorSimlification.CommonFactorSimlificationActionFx(Dummy.LeftSideAccess, ref CONTINUE, ref UIS);
            Dummy.RightSideAccess = CommonFactorSimlification.CommonFactorSimlificationActionFx(Dummy.RightSideAccess, ref CONTINUE, ref UIS);
            //Dummy = CommonFactorSimlification.CommonFactorSuitable(Dummy,ref CONTINUE);
            int INCREASE = 2147483647 / 20;

            UIS.SetProgressValue(UIS.progressBar7, 0);
            if (IS.IsMinuseOrPluse(Dummy.CopyNewTree(Dummy).SampleAccess))
            {
                if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess) && (IS.IsDiv(Dummy.RightSideAccess.SampleAccess)))
                {
                    UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                    AddToTree.Tree COMMONFACTOR = CommonFactor.CommonFactorFx(Dummy.LeftSideAccess.RightSideAccess, Dummy.RightSideAccess.RightSideAccess);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATIONONE   = new AddToTree.Tree(null, false);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATIONTOW   = new AddToTree.Tree(null, false);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATIONTHREE = new AddToTree.Tree(null, false);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATIONFOUR  = new AddToTree.Tree(null, false);
                    AddToTree.Tree COMMONFACTORSIMPLIFICATION      = new AddToTree.Tree(null, false);

                    /*COMMONFACTORSIMPLIFICATIONONE.SetLefTandRightCommonlySide(COMMONFACTOR.CopyNewTree(COMMONFACTOR),Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess));
                     * COMMONFACTORSIMPLIFICATIONONE.LeftSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONONE;
                     * COMMONFACTORSIMPLIFICATIONONE.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONONE;
                     * COMMONFACTORSIMPLIFICATIONONE.SampleAccess = "/";
                     */
                    COMMONFACTORSIMPLIFICATIONONE = Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess);

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

                    COMMONFACTORSIMPLIFICATIONTOW.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONONE, Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess));
                    COMMONFACTORSIMPLIFICATIONTOW.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONTOW;
                    COMMONFACTORSIMPLIFICATIONTOW.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTOW;
                    COMMONFACTORSIMPLIFICATIONTOW.SampleAccess = "*";

                    /*COMMONFACTORSIMPLIFICATIONTHREE.SetLefTandRightCommonlySide(COMMONFACTOR.CopyNewTree(COMMONFACTOR), Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess));
                     * COMMONFACTORSIMPLIFICATIONTHREE.LeftSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTHREE;
                     * COMMONFACTORSIMPLIFICATIONTHREE.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTHREE;
                     * COMMONFACTORSIMPLIFICATIONTHREE.SampleAccess = "/";
                     */
                    //ERRORCORECTION30704050  :Refer to page 302.
                    COMMONFACTORSIMPLIFICATIONTHREE = Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess);

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

                    COMMONFACTORSIMPLIFICATIONFOUR.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONTHREE, Dummy.CopyNewTree(Dummy.RightSideAccess.LeftSideAccess));
                    COMMONFACTORSIMPLIFICATIONFOUR.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONFOUR;
                    COMMONFACTORSIMPLIFICATIONFOUR.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONFOUR;
                    COMMONFACTORSIMPLIFICATIONFOUR.SampleAccess = "*";

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

                    COMMONFACTORSIMPLIFICATION.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONTOW, COMMONFACTORSIMPLIFICATIONFOUR);
                    COMMONFACTORSIMPLIFICATION.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATION;
                    COMMONFACTORSIMPLIFICATION.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATION;
                    COMMONFACTORSIMPLIFICATION.SampleAccess = Dummy.SampleAccess;

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

                    COMMONFACTORSIMPLIFICATION.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATION.CopyNewTree(COMMONFACTORSIMPLIFICATION), COMMONFACTOR.CopyNewTree(COMMONFACTOR));
                    COMMONFACTORSIMPLIFICATION.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATION;
                    COMMONFACTORSIMPLIFICATION.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATION;
                    COMMONFACTORSIMPLIFICATION.SampleAccess = "/";

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

                    COMMONFACTORSIMPLIFICATION.ThreadAccess = Dummy.ThreadAccess;
                    //ERROCOCRECTIOn8912739879874 :The thread must be refernces to befor node.
                    Dummy    = COMMONFACTORSIMPLIFICATION;
                    CONTINUE = true;
                }
                else
                {
                    UIS.SetProgressValue(UIS.progressBar7, 2147483647 / 3);
                    if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess))
                    {
                        UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                        AddToTree.Tree COMMONFACTORSIMPLIFICATIONONE = new AddToTree.Tree(null, false);
                        AddToTree.Tree COMMONFACTORSIMPLIFICATIONTOW = new AddToTree.Tree(null, false);
                        AddToTree.Tree COMMONFACTORSIMPLIFICATION    = new AddToTree.Tree(null, false);

                        COMMONFACTORSIMPLIFICATIONONE.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess), Dummy.CopyNewTree(Dummy.RightSideAccess));
                        COMMONFACTORSIMPLIFICATIONONE.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONONE;
                        COMMONFACTORSIMPLIFICATIONONE.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONONE;
                        COMMONFACTORSIMPLIFICATIONONE.SampleAccess = "*";

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

                        COMMONFACTORSIMPLIFICATIONTOW.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), COMMONFACTORSIMPLIFICATIONONE.CopyNewTree(COMMONFACTORSIMPLIFICATIONONE));
                        COMMONFACTORSIMPLIFICATIONTOW.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONTOW;
                        COMMONFACTORSIMPLIFICATIONTOW.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTOW;
                        COMMONFACTORSIMPLIFICATIONTOW.SampleAccess = Dummy.SampleAccess;

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

                        COMMONFACTORSIMPLIFICATION.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONTOW, Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess));
                        COMMONFACTORSIMPLIFICATION.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATION;
                        COMMONFACTORSIMPLIFICATION.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATION;
                        COMMONFACTORSIMPLIFICATION.SampleAccess = "/";

                        COMMONFACTORSIMPLIFICATION.ThreadAccess = Dummy.ThreadAccess;
                        //ERROCOCRECTIOn8912739879874 :The thread must be refernces to befor node.
                        Dummy    = COMMONFACTORSIMPLIFICATION;
                        CONTINUE = true;

                        UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);
                    }
                    else
                    {
                        UIS.SetProgressValue(UIS.progressBar7, (2147483647 / 3) * 2);
                        if (IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
                        {
                            UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);

                            AddToTree.Tree COMMONFACTORSIMPLIFICATIONONE = new AddToTree.Tree(null, false);
                            AddToTree.Tree COMMONFACTORSIMPLIFICATIONTOW = new AddToTree.Tree(null, false);
                            AddToTree.Tree COMMONFACTORSIMPLIFICATION    = new AddToTree.Tree(null, false);

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

                            COMMONFACTORSIMPLIFICATIONONE.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess), Dummy.CopyNewTree(Dummy.LeftSideAccess));
                            COMMONFACTORSIMPLIFICATIONONE.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONONE;
                            COMMONFACTORSIMPLIFICATIONONE.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONONE;
                            COMMONFACTORSIMPLIFICATIONONE.SampleAccess = "*";

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

                            COMMONFACTORSIMPLIFICATIONTOW.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONONE.CopyNewTree(COMMONFACTORSIMPLIFICATIONONE), Dummy.CopyNewTree(Dummy.RightSideAccess.LeftSideAccess));
                            COMMONFACTORSIMPLIFICATIONTOW.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATIONTOW;
                            COMMONFACTORSIMPLIFICATIONTOW.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATIONTOW;
                            COMMONFACTORSIMPLIFICATIONTOW.SampleAccess = Dummy.SampleAccess;

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

                            COMMONFACTORSIMPLIFICATION.SetLefTandRightCommonlySide(COMMONFACTORSIMPLIFICATIONTOW, Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess));
                            COMMONFACTORSIMPLIFICATION.LeftSideAccess.ThreadAccess  = COMMONFACTORSIMPLIFICATION;
                            COMMONFACTORSIMPLIFICATION.RightSideAccess.ThreadAccess = COMMONFACTORSIMPLIFICATION;
                            COMMONFACTORSIMPLIFICATION.SampleAccess = "/";
                            //ERROCOCRECTIOn8912739879874 :The thread must be refernces to befor node.

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

                            COMMONFACTORSIMPLIFICATION.ThreadAccess = Dummy.ThreadAccess;

                            Dummy    = COMMONFACTORSIMPLIFICATION;
                            CONTINUE = true;

                            UIS.SetProgressValue(UIS.progressBar7, INCREASE + UIS.progressBar7.Value);
                        }
                    }
                }
            }
            UIS.SetProgressValue(UIS.progressBar7, 2147483647);


            return(Dummy);
        }
Пример #25
0
        static AddToTree.Tree SpliterCalculator(AddToTree.Tree Dummy, ref bool Again, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            Dummy.LeftSideAccess = Spliter.SpliterCalculator(Dummy.LeftSideAccess, ref Again, ref UIS);
            try
            {
                if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            Dummy.RightSideAccess = Spliter.SpliterCalculator(Dummy.RightSideAccess, ref Again, ref UIS);
            try
            {
                if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                {
                    Dummy = Dummy.LeftSideAccess;
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }

            //ERROR091409214 :The some needed spliation dose not acts.
            //if (Dummy.SampleAccess == "/")
            //ERRORCORECTION98242184 :Corrected as below.
            int INCREASE = 2147483647 / 4;

            UIS.SetProgressValue(UIS.progressBar11, 0);
            try
            {
                if (Dummy.SampleAccess == "/")
                {
                    if (((Dummy.LeftSideAccess.SampleAccess == "+") || (Dummy.LeftSideAccess.SampleAccess == "-")) && (AllowToMulMinusePluse.AllowToMulMinusePluseFx(Dummy, ref UIS)) && (Dummy.SplitableAccess))
                    {
                        UIS.SetProgressValue(UIS.progressBar11, INCREASE + UIS.progressBar11.Value);
                        Again = true;
                        AddToTree.Tree Div1 = Dummy.CopyNewTree(Dummy.RightSideAccess);
                        AddToTree.Tree Div2 = Dummy.CopyNewTree(Dummy.RightSideAccess);

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

                        //Dummy = Dummy.LeftSideAccess;

                        AddToTree.Tree DummyLeft = new AddToTree.Tree("/", false);

                        DummyLeft.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), Div1);
                        DummyLeft.LeftSideAccess.ThreadAccess  = DummyLeft;
                        DummyLeft.RightSideAccess.ThreadAccess = DummyLeft;

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

                        Dummy.LeftSideAccess.LeftSideAccess = DummyLeft;
                        Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.LeftSideAccess;

                        AddToTree.Tree DummyRight = new AddToTree.Tree("/", false);
                        //ERROR37492387 :Refe to page 261.
                        DummyRight.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess), Div2);
                        DummyRight.LeftSideAccess.ThreadAccess  = DummyRight;
                        DummyRight.RightSideAccess.ThreadAccess = DummyRight;

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

                        Dummy.LeftSideAccess.RightSideAccess = DummyRight;
                        Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;


                        Dummy.LeftSideAccess.ThreadAccess = Dummy.ThreadAccess;
                        Dummy = Dummy.LeftSideAccess;
                        UIS.SetProgressValue(UIS.progressBar11, 2147483647);
                    }
                    //  :The error is at here.refre to page 287.
                    //ADDDED73562150 :The added is here :Refer to page 331.

                    /*if ((Dummy.RightSideAccess.SampleAccess == "+") || (Dummy.RightSideAccess.SampleAccess == "-"))
                     * {
                     *  Again = true;
                     *  AddToTree.Tree Div1 = Dummy.CopyNewTree(Dummy.LeftSideAccess);
                     *  AddToTree.Tree Div2 = Dummy.CopyNewTree(Dummy.LeftSideAccess);
                     *
                     *  Dummy = Dummy.RightSideAccess;
                     *
                     *  AddToTree.Tree DummyRight=new AddToTree.Tree("/",false);
                     *
                     *  DummyRight.SetLefTandRightCommonlySide(Div1,Dummy.CopyNewTree(Dummy.RightSideAccess));
                     *  DummyRight.LeftSideAccess.ThreadAccess = DummyRight;
                     *  DummyRight.RightSideAccess.ThreadAccess = DummyRight;
                     *
                     *  DummyRight.RightSideAccess=DummyRight;
                     *  Dummy.RightSideAccess.ThreadAccess=Dummy;
                     *
                     *  AddToTree.Tree DummyLeft=new AddToTree.Tree("/",false);
                     *
                     *  DummyLeft.SetLefTandRightCommonlySide(Div2, Dummy.CopyNewTree(Dummy.RightSideAccess));
                     *  DummyLeft.LeftSideAccess.ThreadAccess = DummyLeft;
                     *  DummyLeft.RightSideAccess.ThreadAccess = DummyLeft;
                     *
                     *  DummyLeft.RightSideAccess=DummyLeft;
                     *  Dummy.LeftSideAccess.ThreadAccess=Dummy;
                     *
                     *  Dummy=Dummy.ThreadAccess;
                     *
                     *  Dummy.RightSideAccess.ThreadAccess=Dummy.ThreadAccess;
                     *  Dummy=Dummy.RightSideAccess;
                     *
                     * }
                     */
                    /*if (IS.IsOperator(Dummy.SampleAccess))
                     *  if (!IS.IsPower(Dummy.SampleAccess))
                     *      if (!IS.IsFunction(Dummy.SampleAccess))
                     *      {
                     *          AddToTree.Tree Div= Spliter.TheRightSideOperandOfDivision(Dummy)
                     *          if (!SPLITED.FINDTreeWithThreadConsideration(Dummy.LeftSideAccess))
                     *          {
                     *              Dummy.LeftSideAccess = Spliter.DivisionSpliter(Dummy.LeftSideAccess,Div, 0);
                     *              Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess = Dummy.LeftSideAccess;
                     *              Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
                     *          }
                     *          if (!SPLITED.FINDTreeWithThreadConsideration(Dummy.RightSideAccess))
                     *          {
                     *              Dummy.RightSideAccess = Spliter.DivisionSpliter(Dummy.RightSideAccess,Div, 0);
                     *              Dummy.RightSideAccess.LeftSideAccess.ThreadAccess = Dummy.RightSideAccess;
                     *              Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess;
                     *          }
                     *
                     *          SPLITED.ADDToTree(Dummy);
                     *          //Dummy.LeftSideAccess.ThreadAccess = Dummy;
                     *          //if (Dummy.ThreadAccess == null)
                     *          //  Dummy.LeftSideAccess.ThreadAccess = null;
                     *          //Dummy = Dummy.LeftSideAccess;
                     *
                     *
                     *      }
                     */
                }
                else
                {       //ERRORCORECTION981278 :Correction of ERRORCAUSE713040 .refer to page 182.
                        //ERROR30405031v :Refer to page 207.

                    /*if (!SPLITED.ISEmpty())
                     * {
                     *  if (Dummy.ThreadAccess == null)
                     *      Dummy.LeftSideAccess.ThreadAccess = null;
                     *  Dummy = Dummy.LeftSideAccess;
                     * }
                     */
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }

            /*
             *  if (Again)
             *  {
             *      Again = false;
             *      Spliter.SpliterCalculator(Dummy);
             *
             *  }*/
            return(Dummy);
        }
Пример #26
0
        static AddToTree.Tree MulTowDivisionCalculator(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            //int INCREASE = 2147483647;
            UIS.SetProgressValue(UIS.progressBar6, 0);
            if (IS.IsMul(Dummy.SampleAccess))
            {
                if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess) && IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
                {
                    AddToTree.Tree MUL = new AddToTree.Tree(null, false);
                    MUL = Dummy.CopyNewTree(Dummy.LeftSideAccess.RightSideAccess);
                    Dummy.LeftSideAccess.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.LeftSideAccess.LeftSideAccess), Dummy.CopyNewTree(Dummy.RightSideAccess.LeftSideAccess));
                    Dummy.LeftSideAccess.SampleAccess = "*";
                    Dummy.LeftSideAccess.LeftSideAccess.ThreadAccess  = Dummy.LeftSideAccess;
                    Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;

                    Dummy.SampleAccess = "/";

                    Dummy.RightSideAccess.SetLefTandRightCommonlySide(MUL, Dummy.CopyNewTree(Dummy.RightSideAccess.RightSideAccess));
                    Dummy.RightSideAccess.SampleAccess = "*";
                    Dummy.RightSideAccess.LeftSideAccess.ThreadAccess  = Dummy.RightSideAccess;
                    Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess;
                }
                UIS.SetProgressValue(UIS.progressBar6, 2147483647);

/*                else
 *                  if (IS.IsDiv(Dummy.LeftSideAccess.SampleAccess))
 *                  {
 *                      AddToTree.Tree MUL = new AddToTree.Tree(null, false);
 *                      MUL = Dummy.CopyNewTree(Dummy.RightSideAccess);
 *                      Dummy.RightSideAccess = Dummy.LeftSideAccess.RightSideAccess;
 *                      Dummy.RightSideAccess.ThreadAccess = Dummy;
 *
 *                      Dummy.SampleAccess = "/";
 *
 *                      Dummy.LeftSideAccess.RightSideAccess = MUL;
 *                      Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
 *                      Dummy.LeftSideAccess.SampleAccess = "*";
 *
 *
 *                  }
 *                  else
 *                      if (IS.IsDiv(Dummy.RightSideAccess.SampleAccess))
 *                      {
 *                          Dummy.SetLefTandRightCommonlySide(Dummy.RightSideAccess,Dummy.LeftSideAccess);
 *
 *                          AddToTree.Tree MUL = new AddToTree.Tree(null, false);
 *                          MUL = Dummy.CopyNewTree(Dummy.RightSideAccess);
 *                          Dummy.RightSideAccess = Dummy.LeftSideAccess.RightSideAccess;
 *                          Dummy.RightSideAccess.ThreadAccess = Dummy;
 *
 *                          Dummy.SampleAccess = "/";
 *
 *                          Dummy.LeftSideAccess.RightSideAccess = MUL;
 *                          Dummy.LeftSideAccess.RightSideAccess.ThreadAccess = Dummy.LeftSideAccess;
 *                          Dummy.LeftSideAccess.SampleAccess = "*";
 *
 *
 *                      }
 */
            }
            MulTowDivision.MulTowDivisionCalculator(Dummy.LeftSideAccess, ref UIS);
            MulTowDivision.MulTowDivisionCalculator(Dummy.RightSideAccess, ref UIS);
            return(Dummy);
        }
Пример #27
0
        static public bool IsEqualWithOutThreadConsiderationByDivision(AddToTree.Tree T1, AddToTree.Tree T2, ref UknownIntegralSolver UIS, ref float Quficient)
        {
            bool Is = false;

            try
            {
                AddToTree.Tree Code = new AddToTree.Tree("/", false);

                T2      = Simplifier.SimplifierFx(T2, ref UIS);
                Answer1 = new AddToTreeTreeLinkList();
                Answer2 = new AddToTreeTreeLinkList();

                Answer1.CreateLinkListFromTree1(T2);
                Answer2.CreateLinkListFromTree1(T1);

                //                Answer1Recrve.CreateLinkListFromTree2(T2);
                //              Answer2Recrve.CreateLinkListFromTree2(UIS.Enterface.SenderAccess.AutoSenderAccess.NodeAccess.CopyNewTree(UIS.Enterface.SenderAccess.AutoSenderAccess.NodeAccess));


                if (Answer2.Node.EqualLinkList(Answer1.Node))//ERRORCORECTION6465464654:The Sigle Statment Recursive Integral Solved:1394/1/31
                {
                    if (IS.IsNumber(T2.LeftSideAccess.SampleAccess) && IS.IsNumber(T1.LeftSideAccess.SampleAccess))
                    {
                        if (Integral.IntegralSignPositive)
                        {
                            Quficient = (float)(System.Convert.ToDouble(T1.CopyNewTree(T1).SampleAccess) - Quficient * System.Convert.ToDouble(T2.LeftSideAccess.SampleAccess));
                        }
                        else
                        {
                            Quficient = (float)(System.Convert.ToDouble(T1.CopyNewTree(T1).SampleAccess) + Quficient * System.Convert.ToDouble(T2.LeftSideAccess.SampleAccess));
                        }

                        Is = true;
                    }
                    else
                    if (IS.IsNumber(T2.LeftSideAccess.SampleAccess))
                    {
                        if (Integral.IntegralSignPositive)
                        {
                            Quficient = (float)(1.0 - Quficient * System.Convert.ToDouble(T2.LeftSideAccess.SampleAccess));
                        }
                        else
                        {
                            Quficient = (float)(1.0 + Quficient * System.Convert.ToDouble(T2.LeftSideAccess.SampleAccess));
                        }

                        Is = true;
                    }
                }

                if (!Is)
                {
                    if (Answer2.Node.EqualLinkList2(Answer1.Node))//ERRORCORECTION6465464654:The Sigle Statment Recursive Integral Solved:1394/1/31
                    {
                        if (IS.IsNumber(T2.SampleAccess) && IS.IsNumber(T1.LeftSideAccess.SampleAccess))
                        {
                            if (Integral.IntegralSignPositive)
                            {
                                Quficient = (float)(System.Convert.ToDouble(T1.CopyNewTree(T1).SampleAccess) - Quficient * System.Convert.ToDouble(T2.SampleAccess));
                            }
                            else
                            {
                                Quficient = (float)(System.Convert.ToDouble(T1.CopyNewTree(T1).SampleAccess) + Quficient * System.Convert.ToDouble(T2.SampleAccess));
                            }

                            Is = true;
                        }
                        else
                        if (!IS.IsNumber(T2.SampleAccess))
                        {
                            if (Integral.IntegralSignPositive)
                            {
                                Quficient = (float)(1.0 - Quficient);
                            }
                            else
                            {
                                Quficient = (float)(1.0 + Quficient);
                            }

                            Is = true;
                        }
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            return(Is);
        }
Пример #28
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);
        }
Пример #29
0
        static private AddToTree.Tree TrasmisionActionHole(AddToTree.Tree Dummy)
        {
            //ERROR13107142 :This code cuased to an infinite loop.refer to page 182.
            if (Dummy == null)
            {
                return(Dummy);
            }
            TransmisionToDeleteingMinusPluse.TrasmisionActionHole(Dummy.LeftSideAccess);
            TransmisionToDeleteingMinusPluse.TrasmisionActionHole(Dummy.RightSideAccess);
            try
            {
                bool           ABLE          = false;
                AddToTree.Tree CurrentObject = Dummy;
                AddToTree.Tree NODE          = Dummy;
                AddToTree.Tree FIRST         = Dummy;
                while ((IS.IsOperator(FIRST.SampleAccess)) && (FIRST.SampleAccess != "/") && (FIRST.SampleAccess != "^") && (FIRST.ThreadAccess != null))
                {
                    FIRST = FIRST.ThreadAccess;
                }

                int DeepLeft = 0;
                while ((NODE.LeftSideAccess != null) && (IS.IsOperator(NODE.SampleAccess)) && (NODE.SampleAccess != "/") && (NODE.SampleAccess != "^"))
                {
                    NODE = NODE.LeftSideAccess;
                    DeepLeft++;
                }
                //ERRORCORECTION9872423784 :The ERRORCUASE713040 Correction.refer to page 182.
                if (NODE.LeftSideAccess != null)
                {
                    if (NODE.LeftSideAccess.LeftSideAccess != null)
                    {
                        ABLE = true;
                    }
                }

                if (ABLE)
                {
                    if (DeepLeft > 1)
                    {
                        AddToTree.Tree Last = NODE.CopyNewTree(NODE.ThreadAccess);

                        Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, FIRST);
                        AddToTree.Tree Holder = Dummy.RightSideAccess;
                        Dummy.SetLefTandRightCommonlySide(Dummy.LeftSideAccess, Last.LeftSideAccess);
                        Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                        Dummy.RightSideAccess.ThreadAccess = Dummy;

                        while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, Last))
                        {
                            Dummy = Dummy.LeftSideAccess;
                        }
                        Dummy.LeftSideAccess = Holder;

                        Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                        Dummy.RightSideAccess.ThreadAccess = Dummy;
                        while ((Dummy.ThreadAccess != null) && (!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, CurrentObject)))
                        {
                            Dummy = Dummy.ThreadAccess;
                        }
                    }
                }

                ABLE  = false;
                NODE  = Dummy;
                FIRST = Dummy;

                while ((IS.IsOperator(FIRST.SampleAccess)) && (FIRST.SampleAccess != "^") && (FIRST.SampleAccess != "/") && (FIRST.ThreadAccess != null))
                {
                    FIRST = FIRST.ThreadAccess;
                }

                int DeepRight = 0;
                while ((NODE.RightSideAccess != null) && (IS.IsOperator(NODE.SampleAccess)) && (NODE.SampleAccess != "/") && (NODE.SampleAccess != "^"))
                {
                    NODE = NODE.RightSideAccess;
                    DeepRight++;
                }
                //ERRORCORECTION9872423784 :The ERRORCUASE713040 Correction.refer to page 182.
                if (NODE.RightSideAccess != null)
                {
                    if (NODE.RightSideAccess.RightSideAccess != null)
                    {
                        ABLE = false;
                    }
                }

                if (ABLE)
                {
                    if (DeepRight > 1)
                    {
                        AddToTree.Tree Last = NODE.CopyNewTree(NODE.ThreadAccess);
                        Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, FIRST);
                        AddToTree.Tree Holder = Dummy.LeftSideAccess;
                        Dummy.SetLefTandRightCommonlySide(Last.RightSideAccess, Dummy.RightSideAccess);
                        Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                        Dummy.RightSideAccess.ThreadAccess = Dummy;

                        while (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess, Last))
                        {
                            Dummy = Dummy.RightSideAccess;
                        }
                        Dummy.RightSideAccess              = Holder;
                        Dummy.LeftSideAccess.ThreadAccess  = Dummy;
                        Dummy.RightSideAccess.ThreadAccess = Dummy;
                        while ((Dummy.ThreadAccess != null) && (!EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, CurrentObject)))
                        {
                            Dummy = Dummy.ThreadAccess;
                        }
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            return(Dummy);
        }
        static public AddToTree.Tree SuitableStructureForLocalSimplifierConverstionOfDivToMul(AddToTree.Tree Dummy, ref bool CONVERSION, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            if (CONVERSION)
            {
                return(Dummy);
            }
            bool CUREENTCONVERSION = false;

            AddToTree.Tree HOLDER      = Dummy;
            AddToTree.Tree HOLDERTOMUL = new AddToTree.Tree(null, false);
            bool           FIND        = false;

            try
            {
                if (Dummy.SampleAccess == "/")
                {
                    while (IS.IsMulOrDiv(Dummy.SampleAccess))
                    {//ERRORCORECTION31704050 :Refer to page 290.
                        if (Dummy.ThreadAccess != null)
                        {
                            Dummy = Dummy.ThreadAccess;
                            FIND  = true;

                            /*bool LEFTTRUERIGHTFALSE = false;
                             * if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, Dummy))
                             *  LEFTTRUERIGHTFALSE = true;
                             * else
                             *  LEFTTRUERIGHTFALSE = false;
                             */
                            bool BREAK = false;
                            if (Dummy.SampleAccess == "/")
                            {
                                HOLDERTOMUL = Dummy.CopyNewTree(Dummy.RightSideAccess);
                                Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                                Dummy.RightSideAccess.SampleAccess = "1";
                                Dummy.SampleAccess = "*";
                                do
                                {
                                    Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, HOLDER);
                                    AddToTree.Tree NEW = new AddToTree.Tree("*", false);
                                    NEW.SetLefTandRightCommonlySide(Dummy.CopyNewTree(Dummy.RightSideAccess), HOLDERTOMUL);
                                    NEW.LeftSideAccess.ThreadAccess    = NEW;
                                    NEW.RightSideAccess.ThreadAccess   = NEW;
                                    Dummy.RightSideAccess              = NEW;
                                    Dummy.RightSideAccess.ThreadAccess = Dummy;
                                    System.Media.SystemSounds.Beep.Play();
                                    BREAK             = true;
                                    CUREENTCONVERSION = true;
                                    //break;
                                } while (!BREAK);
                            }

                            /*else
                             * {
                             * if (LEFTTRUERIGHTFALSE)
                             *      Dummy = Dummy.LeftSideAccess;
                             *  else
                             *      Dummy = Dummy.RightSideAccess;
                             *
                             * }
                             */
                            if (BREAK)
                            {
                                break;
                            }
                        }
                        else
                        {
                            Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, HOLDER);
                            FIND  = false;
                            break;
                        }
                    }
                }
                //ADD7317 :refer to page 291.
                if (CUREENTCONVERSION)
                {
                    AddToTree.Tree THREAD = Dummy.ThreadAccess;
                    Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);
                    Dummy.ThreadAccess = THREAD;
                }
                else
                if (FIND)
                {
                    Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy, HOLDER);
                    FIND  = false;
                }


                SuitableStructureForLocalSimplifier.SuitableStructureForLocalSimplifierConverstionOfDivToMul(Dummy.LeftSideAccess, ref CONVERSION, ref UIS);
                SuitableStructureForLocalSimplifier.SuitableStructureForLocalSimplifierConverstionOfDivToMul(Dummy.RightSideAccess, ref CONVERSION, ref UIS);
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            catch (StackOverflowException t) { ExceptionClass.ExceptionClassMethod(t); }
            return(Dummy);
        }