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; }
public FunctionalEquation(FunctionBase _func, FunctionBounds _bounds) { func = _func; bounds = _bounds.BoundsList; stepsize = _bounds.StepList; }