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