public Func <double, double> GetResult() { double resultantFun(double x) { double result = 0; for (int k = 0; k < m; k++) { double factor = _Factors[k]; double poly = _Polynomials[k](x); result += factor * poly; } return(result); } return(resultantFun); }
/// <summary> /// /// </summary> /// <param name="factors"></param> /// <param name="polynomials"></param> /// <param name="m">degree of the resultant polynomial</param> public Approximation(double[] factors, HermitePolynomials polynomials, double degree) { _Factors = factors; _Polynomials = polynomials; m = degree; }