Class interp_cspline (o2scl)¶
-
template<class
vec_t
, classvec2_t
= vec_t>
classo2scl
::
interp_cspline
: public o2scl::interp_base<vec_t, vec_t>¶ Cubic spline interpolation (GSL)
See also the Interpolation section of the O2scl User’s guide.
By default, this class uses natural boundary conditions, where the second derivative vanishes at each end point. Extrapolation effectively assumes that the second derivative is linear outside of the endpoints.
Storage for cubic spline interpolation
-
o2scl_linalg::ubvector_4_mem
p4m
¶ Memory for the tridiagonalization.
-
void
coeff_calc
(const ubvector &c_array, double dy, double dx, size_t index, double &b, double &c2, double &d) const¶ Compute coefficients for cubic spline interpolation.
-
interp_cspline
()¶ Create a base interpolation object with natural or periodic boundary conditions.
-
~interp_cspline
()¶
-
double
eval
(double x0) const¶ Give the value of the function \( y(x=x_0) \) .
-
double
deriv
(double x0) const¶ Give the value of the derivative \( y^{\prime}(x=x_0) \) .
-
double
deriv2
(double x0) const¶ Give the value of the second derivative \( y^{\prime \prime}(x=x_0) \) .
-
double
integ
(double a, double b) const¶ Give the value of the integral \( \int_a^{b}y(x)~dx \) .
-
const char *
type
() const¶ Return the type,
"interp_cspline"
.
-
interp_cspline
(const interp_cspline<vec_t, vec2_t>&)¶
-
interp_cspline<vec_t, vec2_t> &
operator=
(const interp_cspline<vec_t, vec2_t>&)¶
-
o2scl_linalg::ubvector_4_mem