static bool AllowToMulMinusePluseActionFx(AddToTree.Tree Dummy)
        {
            if (Dummy == null)
            {
                return(true);
            }
            bool Is = true;

            if (Dummy.SampleAccess == "/")
            {
                if (IS.IsMinuseOrPluse(Dummy.SampleAccess))
                {
                    AddToTreeTreeLinkList FACTOR = FindSubFactor.FindSubFactorFx(Dummy.LeftSideAccess, Dummy.RightSideAccess);
                    if (!(FACTOR.ISEmpty()))
                    {
                        AddToTree.Tree FACT = new AddToTree.Tree(null, false);
                        do
                        {
                            FACT = FACTOR.DELETEFromTreeFirstNode();
                            if (IS.IsMinuseOrPluse(FACT.SampleAccess))
                            {
                                Is = false;
                            }
                        }while(!(FACTOR.ISEmpty()));
                    }
                }
            }
            Is = Is && (AllowToMulMinusePluse.AllowToMulMinusePluseActionFx(Dummy.LeftSideAccess));
            Is = Is && (AllowToMulMinusePluse.AllowToMulMinusePluseActionFx(Dummy.RightSideAccess));
            return(Is);
        }
Exemplo n.º 2
0
        static AddToTree.Tree SplitationAllowedCalculator(AddToTree.Tree Dummy, AddToTree.Tree UNDER, ref UknownIntegralSolver UIS)
        {
            if (Dummy == null)
            {
                return(Dummy);
            }
            if ((Dummy.ThreadAccess.SampleAccess == "/") || (Dummy.ThreadAccess.SampleAccess == "*"))
            {
                AddToTreeTreeLinkList ELEMENTS = FactorActivation.GetBigestCommonFactor(UNDER.CopyNewTree(UNDER), ref UIS);

                AddToTree.Tree UNDERDummy = new AddToTree.Tree(null, false);

                while (!(ELEMENTS.ISEmpty()))
                {
                    UNDERDummy = ELEMENTS.DELETEFromTreeFirstNode();
                    if ((Dummy.SampleAccess == "+") && (IS.IsPluSinNode(UNDERDummy)) && (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, UNDERDummy)))
                    {
                        Dummy.SplitableAccess = false;
                    }
                }
            }
            else
            {
                return(Dummy);
            }
            Dummy.LeftSideAccess  = SplitationAllowed.SplitationAllowedCalculator(Dummy.LeftSideAccess, UNDER, ref UIS);
            Dummy.RightSideAccess = SplitationAllowed.SplitationAllowedCalculator(Dummy.RightSideAccess, UNDER, ref UIS);
            return(Dummy);
        }
Exemplo n.º 3
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);
        }
 static public bool IntegralRecursiveMulatFGFx(AddToTreeTreeLinkList MulAtFG, AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
 {
     AddToTree.Tree HOLDER = MulAtFG.DELETEFromTreeFirstNode();
     if (Dummy != null)
     {
         return(EqualToObject.IsEqualWithOutThreadConsiderationByDivision(HOLDER.CopyNewTree(HOLDER), Dummy.CopyNewTree(Dummy), ref UIS));
     }
     return(false);
 }
Exemplo n.º 5
0
        static public bool ExistElementOnAllMulatedNodes(AddToTree.Tree Dummy, AddToTreeTreeLinkList Consideration, ref UknownIntegralSolver UIS)
        {
            bool Is = true;
            AddToTreeTreeLinkList MULATEDELEMENTS = new AddToTreeTreeLinkList();

            while (!(Consideration.ISEmpty()))
            {
                MULATEDELEMENTS = FactorActivation.GetMultedElements(Consideration.DELETEFromTreeFirstNode(), ref UIS);
                Is = Is && (IS.ExistElementOnAllMulatedNodesAction(Dummy, MULATEDELEMENTS));
            }
            return(Is);
        }
Exemplo n.º 6
0
        static bool ExistElementOnAllMulatedNodesAction(AddToTree.Tree Dummy, AddToTreeTreeLinkList MULATEDELEMENTS)
        {
            bool Is = false;

            AddToTree.Tree MuLnode = new AddToTree.Tree(null, false);
            while (!(MULATEDELEMENTS.ISEmpty()))
            {
                MuLnode = MULATEDELEMENTS.DELETEFromTreeFirstNode();
                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, MuLnode))
                {
                    Is = true;
                    break;
                }
            }
            return(Is);
        }
Exemplo n.º 7
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.º 8
0
        static public AddToTreeTreeLinkList GetBigestCommonFactor(AddToTree.Tree Dummy, ref UknownIntegralSolver UIS)
        {
            AddToTreeTreeLinkList CommonFactors = new AddToTreeTreeLinkList();
            AddToTreeTreeLinkList Holder        = new AddToTreeTreeLinkList();

            //ERRORCORECTION1284797 :refer to page 302.
            Holder = ONLYMULnODE.CopyLinkList();
            AddToTree.Tree        Current    = new AddToTree.Tree(null, false);
            AddToTreeTreeLinkList MulatedMul = new AddToTreeTreeLinkList();

            AddToTree.Tree Factors = null;
            while (!(Holder.ISEmpty()))
            {
                Current = Holder.DELETEFromTreeFirstNode();
                //ERRORCORCTION827346 :Refer to page 302.
                //ERROR715540         :Refer to page 302.
                MULATEDELEMENTS = FactorActivation.GetMultedElements(Current, ref UIS);

                AddToTreeTreeLinkList DummyConsiderationCopy = new AddToTreeTreeLinkList();
                DummyConsiderationCopy = ONLYMULnODE.CopyLinkList();

                AddToTreeTreeLinkList DummyConsideration = new AddToTreeTreeLinkList();
                DummyConsideration = ONLYMULnODE.CopyLinkList();

                AddToTree.Tree EveryMulatedElementsConsideration = new AddToTree.Tree(null, false);

                while (!(MULATEDELEMENTS.ISEmpty()))
                {
                    DummyConsideration = DummyConsiderationCopy.CopyLinkList();
                    EveryMulatedElementsConsideration = MULATEDELEMENTS.DELETEFromTreeFirstNode();
                    //bool IsFactor = false;
                    float Num = 0;
                    if (EveryMulatedElementsConsideration.SampleAccess != null)
                    {
                        if ((IS.IsMinusAndPluseFirstNode(Dummy)) && (IS.ExistElementOnAllMulatedNodes(EveryMulatedElementsConsideration, DummyConsideration, ref UIS)) && (IS.IsNotUpperPowerOfNodeInList(EveryMulatedElementsConsideration, AbledFactors.CopyLinkList(), ref Num)) && (!(AbledFactors.FINDTreeWithOutThreadConsideration(EveryMulatedElementsConsideration))))
                        {
                            Factors = EveryMulatedElementsConsideration;
                            AbledFactors.ADDToTree(Factors);
                        }
                    }
                }
            }
            return(AbledFactors);
        }
Exemplo n.º 9
0
        static public bool IsNotUpperPowerOfNodeInList(AddToTree.Tree Dummy, AddToTreeTreeLinkList AbaledFactors, ref float PowerExsistNumber)
        {
            bool Is = false;

            AddToTree.Tree AbaledNode = new AddToTree.Tree(null, false);
            bool           OPERATION  = false;

            while (!(AbaledFactors.ISEmpty()))
            {
                AbaledNode = AbaledFactors.DELETEFromTreeFirstNode();
                if (AbaledNode.SampleAccess == "^")
                {
                    if (Dummy.SampleAccess == "^")
                    {
                        if (IS.IsNumber(Dummy.RightSideAccess.SampleAccess))
                        {
                            if (IS.IsNumber(AbaledNode.RightSideAccess.SampleAccess))
                            {
                                if (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.LeftSideAccess, AbaledNode.LeftSideAccess))
                                {
                                    float NumDummy  = (float)(System.Convert.ToDouble(Dummy.RightSideAccess.SampleAccess));
                                    float NumAbaled = (float)(System.Convert.ToDouble(AbaledNode.RightSideAccess.SampleAccess));
                                    if (NumAbaled < NumDummy)
                                    {
                                        Is = true;
                                    }
                                    PowerExsistNumber = NumAbaled;
                                    OPERATION         = true;
                                    break;
                                }
                            }
                        }
                    }
                }
            }
            if (AbaledFactors.ISEmpty() || (!OPERATION))
            {
                Is = true;
            }
            return(Is);
        }
        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.º 11
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);
        }
Exemplo n.º 12
0
        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);
        }
Exemplo n.º 13
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.º 14
0
        static AddToTree.Tree SimplifierCommonSubFactorActionLeftSideFx(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);
            }
            if ((Dummy.ThreadAccess.SampleAccess == "*") && (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy, COMMONSUBFACTOR)))
            {
                Dummy.SetLefTandRightCommonlySide(null, null);
                Dummy.SampleAccess = "1";
                END = true;
            }
            else
            if ((Dummy.ThreadAccess.SampleAccess == "^") && (EqualToObject.IsEqualWithOutThreadConsiderationCommonly(Dummy.ThreadAccess.LeftSideAccess, 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;
            }

            Dummy.LeftSideAccess  = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionLeftSideFx(Dummy.LeftSideAccess, COMMONSUBFACTOR, ref END, NOTFACTOR);
            Dummy.RightSideAccess = SimplifierCommonSubFactor.SimplifierCommonSubFactorActionLeftSideFx(Dummy.RightSideAccess, COMMONSUBFACTOR, ref END, NOTFACTOR);
            return(Dummy);
        }
 static public AddToTree.Tree RecursiveIntegralAdditionFx(AddToTree.Tree Node, AddToTree.Tree Dummy, AddToTree.Tree MULTOW, float Queficient, AddToTreeTreeLinkList INTEGRALS, AddToTreeTreeLinkList ANSWER)
 {
     if (EqualToObject.IsEqualWithThreadConsiderationCommonly(MULTOW, Node))
     {
         Dummy = RecursiveIntegralAddition.RecursiveIntegralFxAdditionForLinearEquationOneDegrees(Node, Dummy, Queficient);
     }
     return(Dummy);
 }
Exemplo n.º 16
0
        static void IntegralAnswerGraphicallyWittenActionFx(UknownIntegralSolver UIS)
        {
            AddToTreeTreeLinkList DummyLinkList = IntegralAnswerAdding.AnswerAccess.CopyLinkList();

            //  System.Windows.Forms.MessageBox.Show("2.1-The answer Copied.");

            AddToTree.Tree Dummy = new AddToTree.Tree(null, false);

            // System.Windows.Forms.MessageBox.Show("2.2-The Dummy tree newed.");

            ArrtificialItelligenceForGraphicallyDrawing ArrtificialItelligenceForGraphicallyDrawingFx = UIS.EquationAccess.SenderSampleAccess.AutoSenderAccess.DrawingAccess.ArrtificialItelligenceForGraphicallyDrawingAccess;

            //   System.Windows.Forms.MessageBox.Show("2.3-The Artificial class loaded.");

            Set DummySet = new Set();
            int BigestX = 0, SmallestX = 1000000;

            //   System.Windows.Forms.MessageBox.Show("2.4-The Varibles newed and assigened.");

            //DummyLinkList = RecursionAndOptimizingLinkList.RecursionAndOptimizingLinkListFx(DummyLinkList);


            //   System.Windows.Forms.MessageBox.Show("3-The answer is recurved.");

            while (!(DummyLinkList.ISEmpty()))
            {
                Dummy = DummyLinkList.DELETEFromTreeFirstNode();

                // System.Windows.Forms.MessageBox.Show("4-The answer is Loaded from link list.");

                if (Dummy != null)
                {
                    //  System.Windows.Forms.MessageBox.Show("5-The answer of link list is not null.");
                    //DummySet = ArrtificialItelligenceForGraphicallyDrawingFx.CreateGraphicallyNodes(Dummy);

                    ArrtificialItelligenceForGraphicallyDrawingFx.InizializingWhenNeedeForAnswerDrawn(Dummy, 40 + BigestX, 40);

                    //  System.Windows.Forms.MessageBox.Show("6-The answer is Converted to set and inzizialized.");

                    //ArrtificialItelligenceForGraphicallyDrawingFx.CalculatingXAndYAndWhithAndHeight(DummySet, 40 + BigestX, 40, 15, 15,true);


                    //System.Windows.Forms.MessageBox.Show("5-The answer is calculated.");

                    UIS.EquationAccess.SenderAccess.AutoSenderAccess.DrawingAccess.DrawEachNodeOfArrtificialItelligenceForGraphicallyDrawing(ArrtificialItelligenceForGraphicallyDrawingFx, UIS.EquationAccess, UIS.EquationAccess.SenderAccess.AutoSenderAccess);

                    //System.Windows.Forms.MessageBox.Show("7-The answer is drawned.");

                    ArrtificialItelligenceForGraphicallyDrawingFx.TheBigestValueNodeXForcalculationMethode(DummySet, ref BigestX);
                    ArrtificialItelligenceForGraphicallyDrawingFx.TheSmallestValue(DummySet, ref SmallestX);
                    if (Dummy.Equals("+"))//ERRORCORECTION1245678:The Font Scale became smaller:1394/3/28
                    {
                        Written.FiveBasicOprators(0);
                    }
                    else if (Dummy.Equals("-"))
                    {
                        Written.FiveBasicOprators(1);
                    }
                    else if (Dummy.Equals("*"))
                    {
                        Written.FiveBasicOprators(2);
                    }
                    else if (Dummy.Equals("/"))
                    {
                        Written.FiveBasicOprators(3);
                    }
                    else if (Dummy.Equals("^"))
                    {
                        Written.FiveBasicOprators(4);
                    }
                    else
                    {
                        Written.DrawNumberAndVaribale(Dummy.SampleAccess);
                    }
                }
            }
        }
Exemplo n.º 17
0
 static public AddToTree.Tree TeilorCerieceGetFunctionFx(AddToTreeTreeLinkList Dummy)
 {
     return(TeilorCerieceGetFunction.TeilorCerieceGetFunctionFxAction(Dummy));
 }
Exemplo n.º 18
0
        static AddToTree.Tree TeilorCerieceGetFunctionFxAction(AddToTreeTreeLinkList Dummy)
        {
            AddToTree.Tree Returned = new AddToTree.Tree(null, false);

            return(Returned);
        }
Exemplo n.º 19
0
        static public bool IsEqualWithOutThreadConsiderationByDivision(AddToTree.Tree T1, AddToTree.Tree T2, ref UknownIntegralSolver UIS, ref float Quficient)
        {
            bool Is = false;

            try
            {
                AddToTree.Tree Code = new AddToTree.Tree("/", false);

                T2      = Simplifier.SimplifierFx(T2, ref UIS);
                Answer1 = new AddToTreeTreeLinkList();
                Answer2 = new AddToTreeTreeLinkList();

                Answer1.CreateLinkListFromTree1(T2);
                Answer2.CreateLinkListFromTree1(T1);

                //                Answer1Recrve.CreateLinkListFromTree2(T2);
                //              Answer2Recrve.CreateLinkListFromTree2(UIS.Enterface.SenderAccess.AutoSenderAccess.NodeAccess.CopyNewTree(UIS.Enterface.SenderAccess.AutoSenderAccess.NodeAccess));


                if (Answer2.Node.EqualLinkList(Answer1.Node))//ERRORCORECTION6465464654:The Sigle Statment Recursive Integral Solved:1394/1/31
                {
                    if (IS.IsNumber(T2.LeftSideAccess.SampleAccess) && IS.IsNumber(T1.LeftSideAccess.SampleAccess))
                    {
                        if (Integral.IntegralSignPositive)
                        {
                            Quficient = (float)(System.Convert.ToDouble(T1.CopyNewTree(T1).SampleAccess) - Quficient * System.Convert.ToDouble(T2.LeftSideAccess.SampleAccess));
                        }
                        else
                        {
                            Quficient = (float)(System.Convert.ToDouble(T1.CopyNewTree(T1).SampleAccess) + Quficient * System.Convert.ToDouble(T2.LeftSideAccess.SampleAccess));
                        }

                        Is = true;
                    }
                    else
                    if (IS.IsNumber(T2.LeftSideAccess.SampleAccess))
                    {
                        if (Integral.IntegralSignPositive)
                        {
                            Quficient = (float)(1.0 - Quficient * System.Convert.ToDouble(T2.LeftSideAccess.SampleAccess));
                        }
                        else
                        {
                            Quficient = (float)(1.0 + Quficient * System.Convert.ToDouble(T2.LeftSideAccess.SampleAccess));
                        }

                        Is = true;
                    }
                }

                if (!Is)
                {
                    if (Answer2.Node.EqualLinkList2(Answer1.Node))//ERRORCORECTION6465464654:The Sigle Statment Recursive Integral Solved:1394/1/31
                    {
                        if (IS.IsNumber(T2.SampleAccess) && IS.IsNumber(T1.LeftSideAccess.SampleAccess))
                        {
                            if (Integral.IntegralSignPositive)
                            {
                                Quficient = (float)(System.Convert.ToDouble(T1.CopyNewTree(T1).SampleAccess) - Quficient * System.Convert.ToDouble(T2.SampleAccess));
                            }
                            else
                            {
                                Quficient = (float)(System.Convert.ToDouble(T1.CopyNewTree(T1).SampleAccess) + Quficient * System.Convert.ToDouble(T2.SampleAccess));
                            }

                            Is = true;
                        }
                        else
                        if (!IS.IsNumber(T2.SampleAccess))
                        {
                            if (Integral.IntegralSignPositive)
                            {
                                Quficient = (float)(1.0 - Quficient);
                            }
                            else
                            {
                                Quficient = (float)(1.0 + Quficient);
                            }

                            Is = true;
                        }
                    }
                }
            }
            catch (NullReferenceException t) { ExceptionClass.ExceptionClassMethod(t); }
            return(Is);
        }
Exemplo n.º 20
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);
        }
 static public AddToTree.Tree FindAndIndicatingRecursiveIntegralsFx(AddToTree.Tree Node, AddToTree.Tree Dummy, AddToTreeTreeLinkList INTEGRAL, AddToTreeTreeLinkList ANSWER, out bool IntegralA, out float Queficient)
 {
     Dummy = FindAndIndicatingRecursiveIntegrals.FindAndIndicatingRecursiveIntegralsFxLinrearFx(Node, Dummy, out IntegralA, out Queficient);
     return(Dummy);
 }