Beispiel #1
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);
        }
Beispiel #2
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);
        }