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 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); }