文件名称:na7
介绍说明--下载内容均来自于网络,请自行研究使用
Orthogonal Polynomials Approximation
数值分析,计算正交基多项式的系数
-Given a function f and a set of m >0 distinct points . You are supposed to write a function to approximate f by an orthogonal polynomial using the exact function values at the given m points with a weight assigned to each point . The total error must be no larger than a given tolerance.
Format of function
int OPA( double (*f)(double t), int m, double x[], double w[], double c[], double*eps )
where the function pointer double (*f)(double t) defines the function f int m is the number of points double x[] contains points double w[] contains the values of a weight function at the given points x[] double c[] contains the coefficients of the approximation polynomial double*eps is passed into the function as the tolerance for the error, and is supposed to be returned as the value of error. The function OPA is supposed to return the degree of the approximation polynomial.
Note: a constant Max_n is defined so that if the total error is still not small enough when n = Ma
数值分析,计算正交基多项式的系数
-Given a function f and a set of m >0 distinct points . You are supposed to write a function to approximate f by an orthogonal polynomial using the exact function values at the given m points with a weight assigned to each point . The total error must be no larger than a given tolerance.
Format of function
int OPA( double (*f)(double t), int m, double x[], double w[], double c[], double*eps )
where the function pointer double (*f)(double t) defines the function f int m is the number of points double x[] contains points double w[] contains the values of a weight function at the given points x[] double c[] contains the coefficients of the approximation polynomial double*eps is passed into the function as the tolerance for the error, and is supposed to be returned as the value of error. The function OPA is supposed to return the degree of the approximation polynomial.
Note: a constant Max_n is defined so that if the total error is still not small enough when n = Ma
(系统自动生成,下载前可以参看下载内容)
下载文件列表
na7.cpp