Exemplo n.º 1
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);
        }
        static AddToTree.Tree AddingSameUnderElementsSenderActionFx(AddToTree.Tree Node, AddToTree.Tree Dummy, ref bool CllingRightTrueLeftFalse, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            try
            {
                if ((IS.IsPluSinNode(Dummy)))
                {
                    CllingRightTrueLeftFalse = false;
                    Dummy.LeftSideAccess     = AddingSameUnderElements.AddingSameUnderElementsSenderActionFx(Node, Dummy.LeftSideAccess, ref CllingRightTrueLeftFalse, ref UIS);
                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess.ThreadAccess, Dummy.ThreadAccess))
                    {
                        Dummy = Dummy.LeftSideAccess;
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            try
            {
                if ((IS.IsPluSinNode(Dummy)))
                {
                    CllingRightTrueLeftFalse = true;
                    Dummy.RightSideAccess    = AddingSameUnderElements.AddingSameUnderElementsSenderActionFx(Node, Dummy.RightSideAccess, ref CllingRightTrueLeftFalse, ref UIS);
                    //ERRORCORECTION6654444:The Deleting Unregular Plus Operator From Sin(x)^2 Integral:1394/4/6
                    if (Dummy.RightSideAccess.ThreadAccess != null && EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess.ThreadAccess, Dummy.ThreadAccess))
                    {
                        Dummy = Dummy.RightSideAccess;
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            if (Dummy.ThreadAccess != null)
            {
                if (!(((IS.IsMinuseOrPluse(Dummy.ThreadAccess.SampleAccess)))))
                {
                    return(Dummy);
                }
            }

            try
            {
                if ((Dummy.ThreadAccess == null) || (Dummy.ThreadAccess.SampleAccess == "+"))
                {
                    if (Dummy.SampleAccess == "/")
                    {
                        /*            if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.RightSideAccess, Dummy))
                         *              Dummy.ThreadAccess.LeftSideAccess = AddingSameUnderElements.AddingSameUnderElementsActionReciverFx(Node, Dummy.ThreadAccess.LeftSideAccess, Dummy,ref CllingRightTrueLeftFalse);
                         *          else
                         *              if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.ThreadAccess.LeftSideAccess, Dummy))
                         *                  Dummy.ThreadAccess.RightSideAccess = AddingSameUnderElements.AddingSameUnderElementsActionReciverFx(Node, Dummy.ThreadAccess.RightSideAccess, Dummy,ref CllingRightTrueLeftFalse);
                         */
                        Dummy.ThreadAccess = AddingSameUnderElements.AddingSameUnderElementsActionReciverFx(Node, Dummy.ThreadAccess, Dummy, ref CllingRightTrueLeftFalse, ref UIS);
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            return(Dummy);
        }
Exemplo n.º 3
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);
 }
Exemplo n.º 4
0
        static public AddToTree.Tree SpliterFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            try
            {
                Dummy.ThreadAccess = null;
                Dummy = Simplifier.ArrangmentForSpliter(Dummy);

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

                //ERRORCORECTION198234871648 :The condition of splitation added.refer to page 339.
                Dummy = SplitationAllowed.SplitationAllowedFx(Dummy, ref UIS);

                bool CONTINUSE = false;
                do
                {
                    CONTINUSE = false;
                    if (Spliter.ISAtLeastOneDivisionAtNode(Dummy))
                    {
                        Dummy = Spliter.SpliterCalculator(Dummy, ref CONTINUSE, ref UIS);
                    }
                }while (CONTINUSE);
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            return(Dummy);
        }
Exemplo n.º 5
0
        public bool FINDTreeWithThreadConsideration(AddToTree.Tree Dummy)
        {
            LinkListNodeClass Tracer = Node;

            try
            {
            }
            catch (NullReferenceException k) { ExceptionClass.ExceptionClassMethod(k); }
            bool Is = false;

            while (Tracer != null)
            {
                if (Tracer.CurrentAccess != null)
                {
                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy, Tracer.CurrentAccess))
                    {
                        Is = true;
                        break;
                    }
                }
                Tracer = Tracer.NextAccess;
            }

            return(Is);
        }
Exemplo n.º 6
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);
        }
Exemplo n.º 7
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);
        }
Exemplo n.º 8
0
        static public bool IsEqualWithThreadConsiderationCommonly(AddToTree.Tree T1, AddToTree.Tree T2)
        {
            bool Is = false;

            if ((T1 == null) && (T2 == null))
            {
                return(true);
            }
            else
            if (!(((T1 != null) && (T2 != null))))
            {
                return(false);
            }
            try
            {
                //if ((T1.SampleAccess == T2.SampleAccess)&&(T1.NodeNumberAccess==T2.NodeNumberAccess))
                if (T1.SampleAccess == T2.SampleAccess)
                {
                    if ((T1.ThreadAccess == null) && (T2.ThreadAccess == null))
                    {
                        Is = true;
                    }
                    else
                    if (!(((T1.ThreadAccess != null) && (T2.ThreadAccess != null))))
                    {
                        Is = false;
                    }
                    else
                    if (T1.ThreadAccess.SampleAccess == T2.ThreadAccess.SampleAccess)
                    {
                        Is = true;
                    }
                }
                else
                {
                    Is = false;
                }
            }
            catch (NullReferenceException t)
            {
                ExceptionClass.ExceptionClassMethod(t);
            }
            if (!Is)
            {
                return(Is);
            }
            Is = Is && EqualToObject.IsEqualWithThreadConsiderationCommonly(T1.LeftSideAccess, T2.LeftSideAccess);
            Is = Is && EqualToObject.IsEqualWithThreadConsiderationCommonly(T1.RightSideAccess, T2.RightSideAccess);

            return(Is);
        }
Exemplo n.º 9
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);
        }
Exemplo n.º 10
0
 static public AddToTree.Tree DeleteingMulFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
 {
     try
     {
         Dummy = DeletingMultaplification.ArrangmentToDeleteingMul(Dummy);
         Dummy = DeletingMultaplification.RepeatedlyDeletedAction(Dummy, ref UIS);
         //Dummy = Simplifier.SimplifierFxSimpler(Dummy);
         while (Dummy.ThreadAccess != null)
         {
             Dummy = Dummy.ThreadAccess;
         }
     }
     catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
     return(Dummy);
 }
Exemplo n.º 11
0
 static AddToTree.Tree SimplifierCommonSubFactorActionRightSideFx(AddToTree.Tree Dummy, AddToTree.Tree COMMONSUBFACTOR, ref bool END, AddToTreeTreeLinkList NOTFACTOR)
 {
     if (Dummy == null)
     {
         return(Dummy);
     }
     if (Dummy.SampleAccess != "*")
     {
         if (NOTFACTOR.FINDTreeWithOutThreadConsideration(Dummy))
         {
             return(Dummy);
         }
     }
     if (END)
     {
         return(Dummy);
     }
     try
     {   //ERROCRECTIOn98217487 :the last condition (Dummy.ThreadAccess.SampleAccess) is Div.
         if ((EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, COMMONSUBFACTOR) && (Dummy.ThreadAccess.SampleAccess == "*") || (Dummy.ThreadAccess.SampleAccess == "/")))
         {
             Dummy.SetLefTandRightCommonlySide(null, null);
             Dummy.SampleAccess = "1";
             END = true;
         }
         else
         if ((Dummy.ThreadAccess.SampleAccess == "^") && (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, COMMONSUBFACTOR)) && (IS.IsNumber(Dummy.ThreadAccess.RightSideAccess.SampleAccess)))
         {
             float NUM = (float)System.Convert.ToDouble(Dummy.ThreadAccess.RightSideAccess.SampleAccess);
             NUM = NUM - 1;
             if (NUM > 0)
             {
                 Dummy.ThreadAccess.RightSideAccess.SampleAccess = NUM.ToString();
             }
             else
             {
                 Dummy.SetLefTandRightCommonlySide(null, null);
                 Dummy.SampleAccess = "1";
             }
             END = true;
         }
     }
     catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
     Dummy.LeftSideAccess  = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionRightSideFx(Dummy.LeftSideAccess, COMMONSUBFACTOR, ref END, NOTFACTOR);
     Dummy.RightSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionRightSideFx(Dummy.RightSideAccess, COMMONSUBFACTOR, ref END, NOTFACTOR);
     return(Dummy);
 }
Exemplo n.º 12
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);
        }
Exemplo n.º 13
0
        public AddToTreeTreeLinkList CopyLinkList()
        {
            AddToTreeTreeLinkList t = new AddToTreeTreeLinkList();

            t.LinkListInizialize();

            t.Node = this.CopyLinkListAction(this.Node);
            t.Node.ThreadAccess = null;
            t.CurrentSizeAccess = this.CurrentSizeAccess;

            try
            {
                t.Node.CurrentAccess = this.Node.CurrentAccess.CopyNewTree(this.Node.CurrentAccess);
            }

            catch (NullReferenceException k) { ExceptionClass.ExceptionClassMethod(k); }
            return(t);
        }
Exemplo n.º 14
0
        private static AddToTree.Tree ConverSetToAddTreeActionFx(Set Dummy)
        {
            if (Dummy == null)
            {
                return(null);
            }
            AddToTree.Tree TreeDummy = new AddToTree.Tree(null, false);
            try
            {
                TreeDummy.SampleAccess = Dummy.StringSampleAccess;
                TreeDummy.LeftSideAccess.ThreadAccess  = TreeDummy;
                TreeDummy.RightSideAccess.ThreadAccess = TreeDummy;
            }
            catch (NullReferenceException T) { ExceptionClass.ExceptionClassMethod(T); }
            TreeDummy.SetLefTandRightCommonlySide(ConvertClass.ConverSetToAddTreeActionFx(Dummy.LeftSideAccess), ConvertClass.ConverSetToAddTreeActionFx(Dummy.RightSideAccess));

            return(TreeDummy);
        }
Exemplo n.º 15
0
        static public bool IsOperator(String Sample)
        {
            bool IsOperator = false;

            try
            {
                if (Sample != null)
                {
                    if (Sample.ToString() == "+")
                    {
                        IsOperator = true;
                    }
                    else
                    if (Sample.ToString() == "-")
                    {
                        IsOperator = true;
                    }
                    else
                    if (Sample.ToString() == "*")
                    {
                        IsOperator = true;
                    }
                    else
                    if (Sample.ToString() == "/")
                    {
                        IsOperator = true;
                    }
                    else
                    if (Sample.ToString().ToLower() == "pow")
                    {
                        IsOperator = true;
                    }
                    else
                    if (Sample.ToString().ToLower() == "^")
                    {
                        IsOperator = true;
                    }
                }
            }
            catch (StackOverflowException t)
            { ExceptionClass.ExceptionClassMethod(t); }

            return(IsOperator);
        }
Exemplo n.º 16
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);
        }
Exemplo n.º 17
0
        LinkListNodeClass CopyLinkListAction(LinkListNodeClass Dummy)
        {
            if (Dummy == null)
            {
                return(null);
            }
            LinkListNodeClass t = new LinkListNodeClass();

            try
            {
                t.CurrentAccess = Dummy.CurrentAccess.CopyNewTree(Dummy.CurrentAccess);
                t.NextAccess    = this.CopyLinkListAction(Dummy.NextAccess);
                if (t.NextAccess != null)
                {
                    t.NextAccess.ThreadAccess = t;
                }
            }
            catch (NullReferenceException k) { ExceptionClass.ExceptionClassMethod(k); }
            return(t);
        }
Exemplo n.º 18
0
        static public bool IsEqualWithOutThreadConsiderationCommonly(AddToTree.Tree T1, AddToTree.Tree T2)
        {
            bool Is = false;

            if ((T1 == null) && (T2 == null))
            {
                return(true);
            }
            else
            if (!(((T1 != null) && (T2 != null))))
            {
                return(false);
            }
            try
            {
                //if ((T1.SampleAccess == T2.SampleAccess)&&(T1.NodeNumberAccess==T2.NodeNumberAccess))
                if (T1.SampleAccess == T2.SampleAccess)
                {
                    Is = true;
                }
                else
                if (IS.IsNumber(T1.SampleAccess) && IS.IsNumber(T2.SampleAccess) && (System.Math.Abs(System.Convert.ToDouble(T1.SampleAccess) - System.Convert.ToDouble(T2.SampleAccess)) < 0.001))
                {
                    Is = true;
                }
                else
                {
                    Is = false;
                }
            }
            catch (NullReferenceException t)
            {
                ExceptionClass.ExceptionClassMethod(t);
            }
            Is = Is && EqualToObject.IsEqualWithThreadConsiderationCommonly(T1.LeftSideAccess, T2.LeftSideAccess);
            Is = Is && EqualToObject.IsEqualWithThreadConsiderationCommonly(T1.RightSideAccess, T2.RightSideAccess);

            return(Is);
        }
Exemplo n.º 19
0
        public AddToTree.Tree DELETEFromTreeFindedNode(AddToTree.Tree DummyToDeleted)
        {
            AddToTree.Tree RETURN = null;
            if (Node != null)
            {
                if (!ISEmpty())
                {
                    try
                    {
                        LinkListNodeClass Dummy = Node;

                        while ((Dummy != null) && (!(EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.CurrentAccess, DummyToDeleted))))
                        {
                            Dummy = Dummy.NextAccess;
                        }
                        if (Dummy != null)
                        {
                            if (Dummy.NextAccess != null)
                            {
                                Dummy.NextAccess.ThreadAccess = Dummy.ThreadAccess;
                            }
                            Dummy = Dummy.NextAccess;
                        }
                        SetNode(Dummy);
                        CurrentSize--;
                    }
                    catch (NullReferenceException t)
                    {
                        ExceptionClass.ExceptionClassMethod(t);
                        //       System.Windows.Forms.MessageBox.Show("Invalide Deletion Finded Node.");
                    }
                }
            }
            else
            {
                CurrentSize = -1;
            }
            return(RETURN);
        }
        static public AddToTreeTreeLinkList RecursionAndOptimizingLinkListFx(AddToTreeTreeLinkList Dummy)
        {
            if (Dummy.CurrentSizeAccess > -1)
            {
                Formulas.StackTree Stack = new StackTree((Dummy.CurrentSizeAccess) + 1);

                // System.Windows.Forms.MessageBox.Show("2.4.1-The Stsck newed.");

                AddToTree.Tree DummyTree = null;

                while (!(Dummy.ISEmpty()))
                {
                    DummyTree = new AddToTree.Tree(null, false);
                    DummyTree = Dummy.DELETEFromTreeFirstNode();
                    try
                    {
                        if (DummyTree.SampleAccess == null)
                        {
                            continue;
                        }
                        else
                        {
                            Stack.Push(DummyTree);
                        }
                    }
                    catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); continue; }
                }

                // System.Windows.Forms.MessageBox.Show("2.4.2.Stack pushed.");

                while (!(Stack.IsEmpty()))
                {
                    Dummy.ADDToTree(Stack.Pop());
                }

                // System.Windows.Forms.MessageBox.Show("2.4.3.End Of Recursion.");
            }
            return(Dummy);
        }
Exemplo n.º 21
0
        public AddToTree.Tree DELETEFromTreeFirstNode()
        {
            AddToTree.Tree RETURN = new AddToTree.Tree(null, false);

            if (Node != null)
            {
                if (!ISEmpty())
                {
                    try
                    {
                        LinkListNodeClass Dummy = Node;

                        while (Dummy.NextAccess != null)
                        {
                            Dummy = Dummy.NextAccess;
                        }
                        RETURN = Dummy.CurrentAccess;
                        Dummy  = Dummy.ThreadAccess;
                        if (Dummy != null)
                        {
                            Dummy.NextAccess = null;
                        }
                        CurrentSize--;
                        SetNode(Dummy);
                    }
                    catch (NullReferenceException t)
                    {
                        ExceptionClass.ExceptionClassMethod(t);
                        // System.Windows.Forms.MessageBox.Show("Invalide Deletion First Node.");
                    }
                }
            }
            else
            {
                CurrentSize = -1;
            }
            return(RETURN);
        }
Exemplo n.º 22
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);
        }
        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);
        }
        static AddToTree.Tree LocalSearchMinusPlusWithNumberMulatedEqualSimplifierActionFx(AddToTree.Tree Dummy, ref bool MINUSEPLUSWITHNUMBERMULATED)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            bool  SimplifiedTrueOtherWiseFalse = false;
            bool  Suitable             = false;
            bool  MinuseTruePluseFalse = false;
            float Num = 0;

            try
            {
                if (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess))
                {
                    LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtLeft(Dummy.RightSideAccess, Dummy.LeftSideAccess, ref Suitable, ref MinuseTruePluseFalse, ref SimplifiedTrueOtherWiseFalse, ref Num);
                    if (SimplifiedTrueOtherWiseFalse)
                    {
                        if ((Dummy.ThreadAccess.ThreadAccess == null) || (Dummy.SampleAccess == "+"))
                        {
                            if (MinuseTruePluseFalse)
                            {
                                Num = (float)(System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess)) - Num;
                                Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                MINUSEPLUSWITHNUMBERMULATED = true;
                            }
                            else
                            {
                                Num = (float)(System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess)) + Num;
                                Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                MINUSEPLUSWITHNUMBERMULATED = true;
                            }
                        }
                        else
                        if (Dummy.SampleAccess == "-")
                        {
                            if (MinuseTruePluseFalse)
                            {
                                if (MinuseTruePluseFalse)
                                {
                                    Num = (float)(System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess) * -1) - Num;
                                    Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                    MINUSEPLUSWITHNUMBERMULATED = true;
                                }
                                else
                                {
                                    Num = (float)(System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess)) + Num;
                                    Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                    MINUSEPLUSWITHNUMBERMULATED = true;
                                }

//                                    Dummy.LeftSideAccess.SampleAccess = Num.ToString();
                            }
                            else
                            {
                                Num = (float)(System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess)) + Num;
                                Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                MINUSEPLUSWITHNUMBERMULATED = true;
                            }
                        }
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            SimplifiedTrueOtherWiseFalse = false;
            Suitable             = false;
            MinuseTruePluseFalse = false;
            Num = 0;
            try
            {
                if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                {
                    LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtRight(Dummy.LeftSideAccess, Dummy.RightSideAccess, ref Suitable, ref MinuseTruePluseFalse, ref SimplifiedTrueOtherWiseFalse, ref Num);
                    if (SimplifiedTrueOtherWiseFalse)
                    {
                        if (Dummy.SampleAccess == "+")
                        {
                            if (MinuseTruePluseFalse)
                            {
                                Num = (float)(System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess)) - Num;
                                Dummy.RightSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                MINUSEPLUSWITHNUMBERMULATED = true;
                            }
                            else
                            {
                                Num = (float)(System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess)) + Num;
                                Dummy.RightSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                MINUSEPLUSWITHNUMBERMULATED = true;
                            }
                        }
                        else
                        {
                            if (MinuseTruePluseFalse)
                            {
                                Num = (float)(System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess) * -1) - Num;
                                Dummy.LeftSideAccess.RightSideAccess.SampleAccess = Num.ToString();
                                MINUSEPLUSWITHNUMBERMULATED = true;
                            }
                            else
                            {
                                Num = (float)(System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess) * -1) + Num;
                                Dummy.RightSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                MINUSEPLUSWITHNUMBERMULATED = true;
                            }
                        }
                        //Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                        //Dummy.RightSideAccess.SampleAccess = null;
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.LocalSearchMinusPlusWithNumberMulatedEqualSimplifierActionFx(Dummy.LeftSideAccess, ref MINUSEPLUSWITHNUMBERMULATED);
            LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.LocalSearchMinusPlusWithNumberMulatedEqualSimplifierActionFx(Dummy.RightSideAccess, ref MINUSEPLUSWITHNUMBERMULATED);
            return(Dummy);
        }
        static AddToTree.Tree LocalSearchMulDivionWithNumberMulatedEqualSimplifierActionFx(AddToTree.Tree Dummy, ref bool MULDIVISIONWITHNUMBERMULATED, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            bool SimplifiedTrueOtherWiseFalse = false;
            bool Suitable        = false;
            bool MulTrueDivFalse = false;
            bool RETURNED        = false;

            float Num = 0;

            try
            {
                if (Dummy.RightSideAccess.SampleAccess == "/")
                {//ERRORCORECTION19862348761 :Refer to page 288.
                    LocalSearchMulDivionWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatDivIsLocatedAtUp(Dummy.LeftSideAccess, Dummy.RightSideAccess, ref Suitable, ref MulTrueDivFalse, ref SimplifiedTrueOtherWiseFalse, ref Num, ref RETURNED);
                    if (SimplifiedTrueOtherWiseFalse)
                    {
                        Dummy = Dummy.RightSideAccess;
                        if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
                        {
                            Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                            Dummy.RightSideAccess.SampleAccess = "1";
                            Num = Num * (float)(System.Convert.ToDouble(Dummy.LeftSideAccess.SampleAccess));
                            if (Num == 0)
                            {
                                Dummy.LeftSideAccess.SampleAccess = null;
                            }
                            else
                            {
                                Dummy.LeftSideAccess.SampleAccess = Num.ToString();
                            }
                            MULDIVISIONWITHNUMBERMULATED = true;
                        }

                        /*else
                         *  if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess))
                         *  {
                         *      Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                         *      Dummy.LeftSideAccess.SampleAccess = "1";
                         *      Num = Num / (float)(System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess));
                         *      if (Num == 0)
                         *          Dummy.RightSideAccess.SampleAccess = null;
                         *      else
                         *          Dummy.RightSideAccess.SampleAccess = Num.ToString();
                         *  }
                         *  else
                         *  {
                         *      Dummy.SetLefTandRightCommonlySide(null, null);
                         *      if (Num == 0)
                         *          Dummy.SampleAccess = null;
                         *      else
                         *          Dummy.SampleAccess = Num.ToString();
                         *  }
                         */
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }

            if (SimplifiedTrueOtherWiseFalse)
            {
                Dummy = Dummy.ThreadAccess;
                AddToTree.Tree HOLDERTHRED = Dummy.ThreadAccess;
                Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);
                Dummy.ThreadAccess = HOLDERTHRED;
            }
            SimplifiedTrueOtherWiseFalse = false;
            Suitable        = false;
            MulTrueDivFalse = false;
            Num             = 0;
            RETURNED        = false;
            try
            {
                if (Dummy.LeftSideAccess.SampleAccess == "*")
                {
                    LocalSearchMulDivionWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatDivIsLocatedAtDown(Dummy.RightSideAccess, Dummy.LeftSideAccess, ref Suitable, ref MulTrueDivFalse, ref SimplifiedTrueOtherWiseFalse, ref Num, ref RETURNED);
                    if (SimplifiedTrueOtherWiseFalse)
                    {//ERRORCORECTION1274 :Refer to page 292.
                        Dummy = Dummy.LeftSideAccess;
                        if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess))
                        {
                            Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                            Dummy.LeftSideAccess.SampleAccess = "1";
                            Num = (float)(System.Convert.ToDouble(Dummy.LeftSideAccess.SampleAccess)) / Num;
                            if (Num == 0)
                            {
                                Dummy.RightSideAccess.SampleAccess = null;
                            }
                            else
                            {
                                Dummy.RightSideAccess.SampleAccess = Num.ToString();
                            }
                            MULDIVISIONWITHNUMBERMULATED = true;
                        }
                        else
                        if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
                        {
                            Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                            Dummy.RightSideAccess.SampleAccess = "1";
                            Num = Num * (float)(System.Convert.ToDouble(Dummy.LeftSideAccess.SampleAccess));
                            if (Num == 0)
                            {
                                Dummy.LeftSideAccess.SampleAccess = null;
                            }
                            else
                            {
                                Dummy.LeftSideAccess.SampleAccess = Num.ToString();
                            }
                            MULDIVISIONWITHNUMBERMULATED = true;
                        }
                        else
                        {
                            Dummy.SetLefTandRightCommonlySide(null, null);
                            if (Num == 0)
                            {
                                Dummy.SampleAccess = null;
                            }
                            else
                            {
                                Dummy.SampleAccess = Num.ToString();
                            }
                            MULDIVISIONWITHNUMBERMULATED = true;
                        }
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }

            if (SimplifiedTrueOtherWiseFalse)
            {
                Dummy = Dummy.ThreadAccess;
                AddToTree.Tree HOLDERTHRED = Dummy.ThreadAccess;
                Dummy = Simplifier.SimplifierFxSimpler(Dummy, ref UIS);
                Dummy.ThreadAccess = HOLDERTHRED;
            }

            LocalSearchMulDivionWithNumberMulatedEqualSimplifier.LocalSearchMulDivionWithNumberMulatedEqualSimplifierActionFx(Dummy.LeftSideAccess, ref MULDIVISIONWITHNUMBERMULATED, ref UIS);
            LocalSearchMulDivionWithNumberMulatedEqualSimplifier.LocalSearchMulDivionWithNumberMulatedEqualSimplifierActionFx(Dummy.RightSideAccess, ref MULDIVISIONWITHNUMBERMULATED, ref UIS);
            return(Dummy);
        }
        static AddToTree.Tree SuitableToSimplifierLocalThatDivIsLocatedAtUp(AddToTree.Tree Dummy, AddToTree.Tree ToSimplified, ref bool Suitable, ref bool MulTrueDivFalse, ref bool SimplifiedTrueOtherWiseFalse, ref float Num, ref bool RETURNED)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            if (RETURNED)
            {
                return(Dummy);
            }
            try
            {
                if (IS.IsMul(Dummy.SampleAccess))
                {
                    //if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, ToSimplified))
                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess, ToSimplified.RightSideAccess))
                    {
                        if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
                        {
                            Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.SampleAccess);
                            try
                            {
                                if ((ToSimplified.ThreadAccess.ThreadAccess.SampleAccess == "/") && (Dummy.SampleAccess == "*"))
                                {
                                    RETURNED = true;
                                    SimplifiedTrueOtherWiseFalse = true;
                                    MulTrueDivFalse = true;
                                    Dummy.SetLefTandRightCommonlySide(null, null);
                                    Dummy.SampleAccess = "1";
                                    Suitable           = true;
                                    return(Dummy);
                                }
                            }
                            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
                        }

                        /*else
                         * {  //ERRORCORECTION13175402 :Considerable.
                         *  RETURNED = true;
                         *  SimplifiedTrueOtherWiseFalse = true;
                         *  MulTrueDivFalse = true;
                         *  Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                         *  Dummy.RightSideAccess.SampleAccess = "1";
                         *  Suitable = true;
                         *  Num = 1;
                         *  return Dummy;
                         * }
                         */
                    }
                    else
                    if (EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.LeftSideAccess, ToSimplified.RightSideAccess))
                    {
                        if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess))
                        {
                            Num = (float)System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess);
                            try
                            {
                                if ((ToSimplified.ThreadAccess.ThreadAccess.SampleAccess == "/") && (Dummy.ThreadAccess.SampleAccess == "*"))
                                {
                                    RETURNED = true;
                                    SimplifiedTrueOtherWiseFalse = true;
                                    MulTrueDivFalse = true;
                                    Dummy.SetLefTandRightCommonlySide(null, null);
                                    Dummy.SampleAccess = "1";
                                    Suitable           = true;
                                    return(Dummy);
                                }
                            }
                            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
                        }

                        /*else
                         * {//ERRORCORECTION13175402 :Considerable.
                         *  SimplifiedTrueOtherWiseFalse = true;
                         *  MulTrueDivFalse = true;
                         *  Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                         *  Dummy.LeftSideAccess.SampleAccess = "1";
                         *  Suitable = true;
                         *  Num = 1;
                         *  return Dummy;
                         * }*/
                    }
                }
                else
                {
                    RETURNED = true;
                    return(Dummy);
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            LocalSearchMulDivionWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatDivIsLocatedAtUp(Dummy.LeftSideAccess, ToSimplified, ref Suitable, ref MulTrueDivFalse, ref SimplifiedTrueOtherWiseFalse, ref Num, ref RETURNED);
            LocalSearchMulDivionWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatDivIsLocatedAtUp(Dummy.RightSideAccess, ToSimplified, ref Suitable, ref MulTrueDivFalse, ref SimplifiedTrueOtherWiseFalse, ref Num, ref RETURNED);
            return(Dummy);
        }
 static AddToTree.Tree SuitableToSimplifierLocalThatDivIsLocatedAtDown(AddToTree.Tree Dummy, AddToTree.Tree ToSimplified, ref bool Suitable, ref bool MulTrueDivFalse, ref bool SimplifiedTrueOtherWiseFalse, ref float Num, ref bool RETURNED)
 {
     if (Dummy == null)
     {
         return(Dummy);
     }
     if (RETURNED)
     {
         return(Dummy);
     }
     try
     {
         if (IS.IsMul(Dummy.SampleAccess))
         {
         }
         else
         if (IS.IsDiv(Dummy.SampleAccess))
         {
             if ((EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess, ToSimplified.RightSideAccess)) && (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess)))
             {
                 Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.SampleAccess);
                 try
                 {
                     if ((ToSimplified.ThreadAccess.ThreadAccess.SampleAccess == "*") && (Dummy.SampleAccess == "/"))
                     {
                         RETURNED = true;
                         SimplifiedTrueOtherWiseFalse = true;
                         MulTrueDivFalse = false;
                         Dummy.SetLefTandRightCommonlySide(null, null);
                         Dummy.SampleAccess = "1";
                     }
                 }
                 catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
                 Suitable = true;
             }
             else
             if ((EqualToObject.IsEqualWithThreadConsiderationCommonly(Dummy.RightSideAccess.LeftSideAccess, ToSimplified.RightSideAccess)) && (IS.IsMul(Dummy.RightSideAccess.SampleAccess) && (Dummy.SampleAccess == "/")))
             {        //ERRORCORECTION9812737 Private state for Page 292.
                 try
                 {
                     if ((ToSimplified.ThreadAccess.SampleAccess == "*"))
                     {
                         RETURNED = true;
                         SimplifiedTrueOtherWiseFalse = true;
                         MulTrueDivFalse = false;
                         Dummy.RightSideAccess.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                         Dummy.RightSideAccess.LeftSideAccess.SampleAccess = "1";
                         Num = 1;
                     }
                 }
                 catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
             }
             else
             {
                 Suitable = false;
                 return(Dummy);
             }
         }
         else
         {
             RETURNED = true;
             return(Dummy);
         }
     }
     catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
     LocalSearchMulDivionWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatDivIsLocatedAtDown(Dummy.LeftSideAccess, ToSimplified, ref Suitable, ref MulTrueDivFalse, ref SimplifiedTrueOtherWiseFalse, ref Num, ref RETURNED);
     LocalSearchMulDivionWithNumberMulatedEqualSimplifier.SuitableToSimplifierLocalThatDivIsLocatedAtDown(Dummy.RightSideAccess, ToSimplified, ref Suitable, ref MulTrueDivFalse, ref SimplifiedTrueOtherWiseFalse, ref Num, ref RETURNED);
     return(Dummy);
 }
Exemplo n.º 28
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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 30
0
 static void FindSubFactorCommonAddedToListFx(AddToTree.Tree Dummy1)
 {
     if (Dummy1 == null)
     {
         return;
     }
     //ERRORGESSESSADDED8127466 :refer to page 328.
     //ERRORCORECTION892374978 :Refer to page 330.
     if ((!(IS.IsMulInNode(Dummy1))) && (FACTORLISTEDS.ISEmpty()))
     {
         if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1)))
         {
             FACTORLISTEDS.ADDToTree(Dummy1);
         }
     }
     try
     {
         if (Dummy1.SampleAccess == "*")
         {
             //if ((!(IS.IsNumber(Dummy1.LeftSideAccess.SampleAccess))) && (Dummy1.LeftSideAccess.SampleAccess != "*"))
             //{
             //if (!IS.IsMulInNode(Dummy1.LeftSideAccess))
             if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.LeftSideAccess)))
             {
                 FACTORLISTEDS.ADDToTree(Dummy1.LeftSideAccess);
             }
             if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.LeftSideAccess)))
             {
                 if (Dummy1.LeftSideAccess.SampleAccess == "^")
                 {
                     if (IS.IsNumber(Dummy1.LeftSideAccess.RightSideAccess.SampleAccess))
                     {
                         //if (!IS.IsMulInNode(Dummy1.LeftSideAccess.LeftSideAccess))
                         if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.LeftSideAccess.LeftSideAccess)))
                         {
                             FACTORLISTEDS.ADDToTree(Dummy1.LeftSideAccess.LeftSideAccess);
                         }
                     }
                 }
             }
             //}
             //if ((!(IS.IsNumber(Dummy1.RightSideAccess.SampleAccess))) && (Dummy1.RightSideAccess.SampleAccess != "*"))
             //{
             //if (!IS.IsMulInNode(Dummy1.RightSideAccess))
             if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.RightSideAccess)))
             {
                 FACTORLISTEDS.ADDToTree(Dummy1.RightSideAccess);
             }
             if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.RightSideAccess)))
             {
                 if (Dummy1.RightSideAccess.SampleAccess == "^")
                 {
                     if (IS.IsNumber(Dummy1.RightSideAccess.RightSideAccess.SampleAccess))
                     {
                         //if (!IS.IsMulInNode(Dummy1.RightSideAccess.LeftSideAccess))
                         if (!(FACTORLISTEDS.FINDTreeWithOutThreadConsideration(Dummy1.RightSideAccess.LeftSideAccess)))
                         {
                             FACTORLISTEDS.ADDToTree(Dummy1.RightSideAccess.LeftSideAccess);
                         }
                     }
                 }
             }
             //}
         }
         FindSubFactor.FindSubFactorCommonAddedToListFx(Dummy1.LeftSideAccess);
         FindSubFactor.FindSubFactorCommonAddedToListFx(Dummy1.RightSideAccess);
     }
     catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
 }