Esempio n. 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);
        }
Esempio n. 2
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);
        }
        static public bool AllowToMulMinusePluseFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            Dummy.LeftSideAccess  = FactorActivation.FactorActivationFx(Dummy.LeftSideAccess, ref UIS);
            Dummy.RightSideAccess = FactorActivation.FactorActivationFx(Dummy.RightSideAccess, ref UIS);
            bool Is = AllowToMulMinusePluse.AllowToMulMinusePluseActionFx(Dummy);

            return(Is);
        }
Esempio n. 4
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);
        }
Esempio n. 5
0
 static public AddToTree.Tree SplitationAllowedFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
 {
     Dummy = FactorActivation.FactorActivationFx(Dummy, ref UIS);
     //bool CONTINUE=true;
     //while (CONTINUE)
     //{
     //  CONTINUE = false;
     //  Dummy = SimplifierCommonSubFactor.SimplifierCommonSubFactorCalculatorFx(Dummy, ref CONTINUE, ref UIS);
     //}
     return(SplitationAllowed.SplitationAllowedAction(Dummy, ref UIS));
 }
Esempio n. 6
0
        static public bool ExistElementOnAllMulatedNodes(AddToTree.Tree Dummy, AddToTreeTreeLinkList Consideration, ref UknownIntegralSolver UIS)
        {
            bool Is = true;
            AddToTreeTreeLinkList MULATEDELEMENTS = new AddToTreeTreeLinkList();

            while (!(Consideration.ISEmpty()))
            {
                MULATEDELEMENTS = FactorActivation.GetMultedElements(Consideration.DELETEFromTreeFirstNode(), ref UIS);
                Is = Is && (IS.ExistElementOnAllMulatedNodesAction(Dummy, MULATEDELEMENTS));
            }
            return(Is);
        }
Esempio n. 7
0
 static AddToTree.Tree ConvertExtraFactorsTooneFx(AddToTree.Tree Dummy, AddToTree.Tree Factors, ref bool Action, bool Current)
 {
     /*AddToTree.Tree HOLDER = Dummy;
      * if(IS.IsMinuseOrPluse(Dummy.SampleAccess))
      * while (Dummy.SampleAccess != "+")
      *  Dummy = Dummy.ThreadAccess;
      */
     //while (!(Factors.ISEmpty()))
     Dummy = FactorActivation.ConvertExtraFactorsToone(Dummy, Factors, ref Action, Current);
     //Dummy = Dummy.FINDTreeWithThreadConsideration(Dummy,HOLDER);
     return(Dummy);
 }
Esempio n. 8
0
 static void FactorActivationOnlyMuLnodesListedFx(AddToTree.Tree Dummy)
 {
     if (IS.IsNotMinusAndPluseInNode(Dummy))
     {
         if (!(ONLYMULnODE.FINDTreeWithOutThreadConsideration(Dummy)))
         {
             ONLYMULnODE.ADDToTree(Dummy);
             return;
         }
     }
     FactorActivation.FactorActivationOnlyMuLnodesListedFx(Dummy.LeftSideAccess);
     FactorActivation.FactorActivationOnlyMuLnodesListedFx(Dummy.RightSideAccess);
     return;
 }
Esempio n. 9
0
        static bool SuitableForFactorActivation(AddToTree.Tree Dummy)
        {
            if (Dummy == null)
            {
                return(false);
            }
            bool Is = false;

            if (Dummy.SampleAccess == "/")
            {
                Is = true;
            }
            Is = Is || FactorActivation.SuitableForFactorActivation(Dummy.LeftSideAccess);
            Is = Is || FactorActivation.SuitableForFactorActivation(Dummy.RightSideAccess);
            return(Is);
        }
Esempio n. 10
0
 static AddToTree.Tree ConvertExtraFactorsToone(AddToTree.Tree Dummy, AddToTree.Tree Factors, ref bool Action, bool Current)
 {
     if (Dummy == null)
     {
         return(Dummy);
     }
     if ((EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, Factors)) && (!Action) && (!Current))
     {
         Action = true;
         Dummy.SetLefTandRightCommonlySide(null, null);
         Dummy.SampleAccess = "1";
     }
     Dummy.LeftSideAccess  = FactorActivation.ConvertExtraFactorsToone(Dummy.LeftSideAccess, Factors, ref Action, Current);
     Dummy.RightSideAccess = FactorActivation.ConvertExtraFactorsToone(Dummy.RightSideAccess, Factors, ref Action, Current);
     return(Dummy);
 }
Esempio n. 11
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);
        }
Esempio n. 12
0
        static public AddToTreeTreeLinkList GetBigestCommonFactor(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            AddToTreeTreeLinkList CommonFactors = new AddToTreeTreeLinkList();
            AddToTreeTreeLinkList Holder        = new AddToTreeTreeLinkList();

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

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

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

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

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

                while (!(MULATEDELEMENTS.ISEmpty()))
                {
                    DummyConsideration = DummyConsiderationCopy.CopyLinkList();
                    EveryMulatedElementsConsideration = MULATEDELEMENTS.DELETEFromTreeFirstNode();
                    //bool IsFactor = false;
                    float Num = 0;
                    if (EveryMulatedElementsConsideration.SampleAccess != null)
                    {
                        if ((IS.IsMinusAndPluseFirstNode(Dummy)) && (IS.ExistElementOnAllMulatedNodes(EveryMulatedElementsConsideration, DummyConsideration, ref UIS)) && (IS.IsNotUpperPowerOfNodeInList(EveryMulatedElementsConsideration, AbledFactors.CopyLinkList(), ref Num)) && (!(AbledFactors.FINDTreeWithOutThreadConsideration(EveryMulatedElementsConsideration))))
                        {
                            Factors = EveryMulatedElementsConsideration;
                            AbledFactors.ADDToTree(Factors);
                        }
                    }
                }
            }
            return(AbledFactors);
        }
Esempio n. 13
0
        static public AddToTree.Tree FactorActivationFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            while (!(NotAbledFactors.ISEmpty()))
            {
                NotAbledFactors.DELETEFromTreeFirstNode();
            }
            while (!(AbledFactors.ISEmpty()))
            {
                AbledFactors.DELETEFromTreeFirstNode();
            }
            while (!(ONLYMULnODE.ISEmpty()))
            {
                ONLYMULnODE.DELETEFromTreeFirstNode();
            }
            while (!(MULATEDELEMENTS.ISEmpty()))
            {
                MULATEDELEMENTS.DELETEFromTreeFirstNode();
            }
            Dummy = FactorActivation.FactorActivationFirstMinuseOrPluseFx(Dummy, ref UIS);

            return(Dummy);
        }
        static public AddToTree.Tree SimplifierCommonSubFactorCalculatorFx(AddToTree.Tree Dummy, ref bool CONTINUE, ref UknownIntegralSolver UIS)
        {
            if ((Dummy == null) || (!(IS.IsDivInNode(Dummy))))
            {
                return(Dummy);
            }
            //ERRORCORECTION2189743 :the Second condition of above is added.
            int INCREASE = 2147483647 / 9;

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

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

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

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

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

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

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

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

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

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

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

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

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

                UIS.SetProgressValue(UIS.progressBar9, 2147483647);

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

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