Class cheb_approx_tl (o2scl)¶
-
template<class fp_t = double>
class o2scl::cheb_approx_tl¶ Chebyshev approximation (GSL)
Approximate a function on a finite interval using a Chebyshev series:
\[ f(x) = \sum_n c_n T_n(x) \]where \( T_n(x)=\cos(n \arccos x) \)See also the Chebyshev approximation example.
Initialization methods
-
template<class func_t>
inline void init(func_t &func, size_t ord, fp_t a1, fp_t b1)¶ Initialize a Chebyshev approximation of the function
func
over the interval froma1
tob1
.The interval must be specified so that \( a < b \) , so a and b are swapped if this is not the case.
Evaulation methods
Maniupulating coefficients and endpoints
-
inline fp_t get_coefficient(size_t ix) const¶
Get a coefficient.
Legal values of the argument are 0 to
order
(inclusive)
Derivatives and integrals
-
inline void deriv(cheb_approx_tl &gc) const¶
Make
gc
an approximation to the derivative.
-
inline void integ(cheb_approx_tl &gc) const¶
Make
gc
an approximation to the integral.
Public Functions
-
inline cheb_approx_tl()¶
-
inline cheb_approx_tl(const cheb_approx_tl &gc)¶
Copy constructor.
-
inline cheb_approx_tl &operator=(const cheb_approx_tl &gc)¶
Copy constructor.
-
template<class func_t>