Пример #1
0
        static AddToTree.Tree LocalSearchMinusPlusEqualSimplifierActionFx(AddToTree.Tree Dummy, ref bool MINUSEPLUSEEQUAL, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            bool SimplifiedTrueOtherWiseFalse = false;
            bool Suitable             = false;
            bool MinuseTruePluseFalse = false;

            LocalSearchMinusPlusEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtLeft(Dummy, Dummy.LeftSideAccess, out Suitable, out MinuseTruePluseFalse, out SimplifiedTrueOtherWiseFalse);
            if (SimplifiedTrueOtherWiseFalse)
            {
                Dummy.LeftSideAccess.SetLefTandRightCommonlySide(null, null);
                Dummy.LeftSideAccess.SampleAccess = null;
                MINUSEPLUSEEQUAL = true;
            }
            SimplifiedTrueOtherWiseFalse = false;
            Suitable             = false;
            MinuseTruePluseFalse = false;
            LocalSearchMinusPlusEqualSimplifier.SuitableToSimplifierLocalThatToSimplifiedLocatedAtRight(Dummy, Dummy.RightSideAccess, out Suitable, out MinuseTruePluseFalse, out SimplifiedTrueOtherWiseFalse);
            if (SimplifiedTrueOtherWiseFalse)
            {
                Dummy.RightSideAccess.SetLefTandRightCommonlySide(null, null);
                Dummy.RightSideAccess.SampleAccess = null;
                MINUSEPLUSEEQUAL = true;
            }
            LocalSearchMinusPlusEqualSimplifier.LocalSearchMinusPlusEqualSimplifierActionFx(Dummy.LeftSideAccess, ref MINUSEPLUSEEQUAL, ref UIS);
            LocalSearchMinusPlusEqualSimplifier.LocalSearchMinusPlusEqualSimplifierActionFx(Dummy.RightSideAccess, ref MINUSEPLUSEEQUAL, ref UIS);
            return(Dummy);
        }
Пример #2
0
        static public AddToTree.Tree LocalSimplifierFx(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            Dummy = SuitableStructureForLocalSimplifier.SuitableStructureForLocalSimplifierFx(Dummy, ref UIS);
            bool MINUSEPLUSEEQUAL             = false;
            bool MULDIVISIONEQUAL             = false;
            bool MINUSEPLUSWITHNUMBERMULATED  = false;
            bool MULDIVISIONWITHNUMBERMULATED = false;
            int  INCREASE = 2147483647 / 5;

            do
            {
                MINUSEPLUSEEQUAL = false;

                UIS.SetProgressValue(UIS.progressBar10, 0);

                Dummy = LocalSearchMinusPlusEqualSimplifier.LocalSearchMinusPlusEqualSimplifierFx(Dummy, ref MINUSEPLUSEEQUAL, ref UIS);
                //Dummy = LocalSearchMinusPlusEqualSimplifier.LocalSearchMinusPlusEqualSimplifierFx(Dummy);

                UIS.SetProgressValue(UIS.progressBar10, INCREASE + UIS.progressBar10.Value);
                MULDIVISIONEQUAL = false;
                //ERROR30174253 :the result is invalid.refer to page338.
                Dummy = LocalSearchMulDivisionEqualSimplifier.LocalSearchMulDivisionEqualSimplifierFx(Dummy, ref MULDIVISIONEQUAL, ref UIS);

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

                MINUSEPLUSWITHNUMBERMULATED = false;
                Dummy = LocalSearchMinusPlusWithNumberMulatedEqualSimplifier.LocalSearchMinusPlusWithNumberMulatedEqualSimplifierFx(Dummy, ref MINUSEPLUSWITHNUMBERMULATED, ref UIS);

                UIS.SetProgressValue(UIS.progressBar10, INCREASE + UIS.progressBar10.Value);
                MULDIVISIONWITHNUMBERMULATED = false;
                //Dummy = LocalSearchMinusPlusEqualSimplifier.LocalSearchMinusPlusEqualSimplifierFx(Dummy);

                //         Dummy = LocalSearchMinusPlusTowNumberSimplifier.LocalSearchMinusPlusTowNumberSimplifierFx(Dummy);

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

                Dummy = LocalSearchMulDivionWithNumberMulatedEqualSimplifier.LocalSearchMulDivionWithNumberMulatedEqualSimplifierFx(Dummy, ref MULDIVISIONWITHNUMBERMULATED, ref UIS);

                //          Dummy = Simplifier.SimplifierFxSimpler(Dummy);
                UIS.SetProgressValue(UIS.progressBar10, 2147483647);
            } while (MINUSEPLUSEEQUAL || MULDIVISIONEQUAL || MINUSEPLUSWITHNUMBERMULATED || MULDIVISIONWITHNUMBERMULATED);

            return(Dummy);
        }
Пример #3
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);
 }
Пример #4
0
 static public AddToTree.Tree LocalSearchMinusPlusEqualSimplifierFx(AddToTree.Tree Dummy, ref bool MINUSEPLUSEEQUAL, ref UknownIntegralSolver UIS)
 {
     return(LocalSearchMinusPlusEqualSimplifier.LocalSearchMinusPlusEqualSimplifierActionFx(Dummy, ref MINUSEPLUSEEQUAL, ref UIS));
 }