示例#1
0
        static void Plot(string _input)
        {
            string input = _input.Remove(0, 5);

            string[] parts = input.Split(';');

            if (parts.Length == 0)
            {
                throw new MissingFunctionException();
            }

            FunctionBase FB = CodeBase.CreateFunction(parts[0]);

            FunctionalEquationLegacy FE = new FunctionalEquationLegacy(FB, CreateBounds(parts));

            FE.NPlot();
        }
示例#2
0
        private static float NIntCore(FunctionBounds Bounds, FunctionBase FB)
        {
            FunctionalEquationLegacy FE = new FunctionalEquationLegacy(FB, Bounds);

            object[][] Output = (object[][])FE.eval();

            float val = 0;

            for (int x = 0; x < Output.Length; x++)
            {
                float dval = (float)Convert.ToDouble((Output[x][Output[x].Length - 1]));
                for (int j = 0; j < FE.stepsize.Length; j++)
                {
                    dval = dval * (float)FE.stepsize[j];
                }
                val += dval;
            }

            return val;
        }