文件名称: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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.