Exemple #1
0
 static public AddToTree.Tree ConvertAllMinuseToPluseFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
 {
     Dummy = ConvertAllMinuseToPluse.ConvertAllMinuseToPluseActionFx(Dummy, ref UIS);
     //ERROR31754015 :Refer to page 338.
     Dummy = NumberDivMul.NumberDivMulFx(Dummy, ref UIS);
     return(Dummy);
 }
        static public AddToTree.Tree MinuseToPluSeconverterFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            AddToTree.Tree THREAD = Dummy.ThreadAccess;

            Dummy.ThreadAccess = null;

            Dummy = MinuseToPluSeconverter.MinuseToPluSeconverterActionFx(Dummy);

            Dummy.ThreadAccess = THREAD;

            Dummy = NumberDivMul.NumberDivMulFx(Dummy, ref UIS);
            return(Dummy);
        }
        static public AddToTree.Tree SimplifierCommonSubFactorFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            Dummy = Spliter.SpliterFx(Dummy, ref UIS);
            bool CONTINUE = false;

            //do
            //{
            //  CONTINUE = false;
            Dummy = NumberDivMul.NumberDivMulFx(Dummy, ref UIS);

            Dummy = SimplifierCommonSubFactor.SimplifierCommonSubFactorCalculatorFx(Dummy, ref CONTINUE, ref UIS);
            //} while (CONTINUE);
            return(Dummy);
        }
Exemple #4
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);
        }
        static public AddToTree.Tree SimplifierCommonSubFactorCalculatorFx(AddToTree.Tree Dummy, ref bool CONTINUE, ref UknownIntegralSolver UIS)
        {
            if ((Dummy == null) || (!(IS.IsDivInNode(Dummy))))
            {
                return(Dummy);
            }
            //ERRORCORECTION2189743 :the Second condition of above is added.
            int INCREASE = 2147483647 / 9;

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

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

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

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

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

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

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

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

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

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

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

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

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

                UIS.SetProgressValue(UIS.progressBar9, 2147483647);

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

            if (Dummy.RightSideAccess != null)
            {
                Dummy.RightSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorCalculatorFx(Dummy.RightSideAccess, ref CONTINUE, ref UIS);
            }
            return(Dummy);
        }
Exemple #6
0
        static AddToTree.Tree NumberDivMulFxAction(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            Dummy.LeftSideAccess  = NumberDivMul.NumberDivMulFxAction(Dummy.LeftSideAccess, ref UIS);
            Dummy.RightSideAccess = NumberDivMul.NumberDivMulFxAction(Dummy.RightSideAccess, ref UIS);
            int INCREASE = 2147483647 / 6;

            try
            {
                UIS.SetProgressValue(UIS.progressBar15, 0);

                if (IS.IsMul(Dummy.SampleAccess))
                {
                    if (IS.IsMul(Dummy.RightSideAccess.SampleAccess))
                    {
                        if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                        {
                            if (Dummy.LeftSideAccess.SampleAccess.ToLower() == "c")
                            {
                                Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy;
                                Dummy.RightSideAccess = Dummy.RightSideAccess.RightSideAccess;
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                if (IS.IsDiv(Dummy.SampleAccess))
                {
                    if (IS.IsMul(Dummy.LeftSideAccess.SampleAccess))
                    {
                        if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess))
                        {
                            if (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess))
                            {
                                //ERRORCORECTION981273 :The Error corrected.refer to page218.
                                float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess);
                                Num = Num / (float)System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess);
                                Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                Dummy.LeftSideAccess.ThreadAccess = Dummy.ThreadAccess;
                                Dummy = Dummy.LeftSideAccess;
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                if (IS.IsMul(Dummy.SampleAccess))
                {
                    if (IS.IsMul(Dummy.RightSideAccess.SampleAccess))
                    {
                        if (IS.IsNumber(Dummy.LeftSideAccess.SampleAccess))
                        {
                            if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                            {
                                //ERRORCORECTION981273 :The Error corrected.refer to page218.
                                if (Dummy.LeftSideAccess.SampleAccess.ToLower() != "c")
                                {
                                    if (Dummy.RightSideAccess.SampleAccess.ToLower() != "c")
                                    {
                                        float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.SampleAccess);
                                        Num = Num * (float)System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess);
                                        Dummy.LeftSideAccess.SampleAccess = Num.ToString();
                                        Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy.RightSideAccess.ThreadAccess;
                                        Dummy.RightSideAccess = Dummy.RightSideAccess.RightSideAccess;
                                    }
                                    else
                                    {
                                        Dummy.LeftSideAccess.SampleAccess = "C";
                                    }
                                }
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                if (IS.IsDiv(Dummy.SampleAccess))
                {
                    if (IS.IsMul(Dummy.LeftSideAccess.SampleAccess))
                    {
                        if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess))
                        {
                            if (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess))
                            {
                                //ERRORCORECTION981273 :The Error corrected.refer to page218.
                                float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess);
                                Num = Num / (float)System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess);
                                Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                Dummy.LeftSideAccess.ThreadAccess = Dummy;
                                Dummy = Dummy.LeftSideAccess;
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                //ADDCONDITION18979714 :Refer to page 248.
                if (Dummy.SampleAccess == "/")
                {
                    if (Dummy.LeftSideAccess.SampleAccess == "*")
                    {
                        if (Dummy.RightSideAccess.SampleAccess == "*")
                        {
                            if (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess))
                            {
                                if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                                {
                                    if ((Dummy.RightSideAccess.LeftSideAccess.SampleAccess.ToLower() != "c") && ((Dummy.LeftSideAccess.LeftSideAccess.SampleAccess.ToLower() != "c")))
                                    {
                                        float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess);
                                        Num = Num / (float)System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess);
                                        Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                    }
                                    else
                                    {
                                        Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = "C";
                                    }
                                    Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy;
                                    Dummy.RightSideAccess = Dummy.RightSideAccess.RightSideAccess;
                                }
                            }
                        }
                    }
                }
                UIS.SetProgressValue(UIS.progressBar15, INCREASE + UIS.progressBar15.Value);
                if (Dummy.SampleAccess == "*")
                {
                    if (Dummy.LeftSideAccess.SampleAccess == "*")
                    {
                        if (Dummy.RightSideAccess.SampleAccess == "*")
                        {
                            if (IS.IsNumber(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess))
                            {
                                if (IS.IsNumber(Dummy.RightSideAccess.LeftSideAccess.SampleAccess))
                                {
                                    if ((Dummy.RightSideAccess.LeftSideAccess.SampleAccess.ToLower() != "c") && ((Dummy.LeftSideAccess.LeftSideAccess.SampleAccess.ToLower() != "c")))
                                    {
                                        float Num = (float)System.Convert.ToDouble(Dummy.LeftSideAccess.LeftSideAccess.SampleAccess);
                                        Num = Num * (float)System.Convert.ToDouble(Dummy.RightSideAccess.LeftSideAccess.SampleAccess);
                                        Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = Num.ToString();
                                    }
                                    else
                                    {
                                        Dummy.LeftSideAccess.LeftSideAccess.SampleAccess = "C";
                                    }
                                    Dummy.RightSideAccess.RightSideAccess.ThreadAccess = Dummy;
                                    Dummy.RightSideAccess = Dummy.RightSideAccess.RightSideAccess;
                                }
                            }
                        }
                    }
                }
            }
            catch (NullReferenceException t)
            { ExceptionClass.ExceptionClassMethod(t); }
            UIS.SetProgressValue(UIS.progressBar15, 2147483647);
            return(Dummy);
        }