fitpack
Modern Fortran library for curve and surface fitting with splines
Loading...
Searching...
No Matches
fitpack_curves.f90 File Reference

Data Types

interface  fitpack_curves::fitpack_curve
 Univariate spline curve \( y = s(x) \). More...
 
type  fitpack_curves::fitpack_periodic_curve
 Derived type describing a periodic curve. No changes are made to the storage, but the appropriate package functions will be called depending on the type. More...
 

Modules

module  fitpack_curves
 Univariate spline curve fitting module.
 

Functions/Subroutines

type(fitpack_curve) function fitpack_curves::new_from_points (x, y, w, ierr)
 Construct a fitpack_curve from data points and perform a default fit.
 
integer(fp_flag) function fitpack_curves::new_fit (this, x, y, w, smoothing, order)
 Load new data points and perform a fresh fit.
 
elemental subroutine fitpack_curves::destroy (this)
 Destroy a curve object and release all allocated memory.
 
subroutine fitpack_curves::new_points (this, x, y, w)
 Load new data points into the curve, resetting all internal state.
 
real(fp_real) function fitpack_curves::curve_eval_one (this, x, ierr)
 Evaluate the spline at a single point (with error flag).
 
pure real(fp_real) function fitpack_curves::curve_eval_one_noerr (this, x)
 Evaluate the spline at a single point (pure, returns NaN on error).
 
real(fp_real) function, dimension(size(x)) fitpack_curves::curve_eval_many (this, x, ierr)
 Evaluate the spline at multiple points (with error flag).
 
pure real(fp_real) function, dimension(size(x)) fitpack_curves::curve_eval_many_pure (this, x)
 Evaluate the spline at multiple points (pure, returns NaN on error).
 
integer(fp_flag) function fitpack_curves::interpolating_curve (this, order, reset_knots)
 Fit an interpolating spline ( \( s = 0 \)) through the data points.
 
integer(fp_flag) function fitpack_curves::curve_fit_least_squares (this, smoothing, reset_knots)
 Fit a least-squares spline with fixed knots.
 
integer(fp_flag) function fitpack_curves::curve_fit_automatic_knots (this, smoothing, order, keep_knots)
 Fit a smoothing spline with automatic knot placement (curfit / percur).
 
real(fp_real) function, dimension(size(x)) fitpack_curves::curve_derivatives (this, x, order, ierr)
 Evaluate the k-th derivative at multiple points (with error flag).
 
real(fp_real) function, dimension(this%order+1) fitpack_curves::curve_all_derivatives (this, x, ierr)
 Evaluate all derivatives \( s^{(j)}(x) \) for \( j = 0, \ldots, k \) (with error flag).
 
real(fp_real) function, dimension(this%order+1) fitpack_curves::curve_all_derivatives_pure (this, x)
 Evaluate all derivatives \( s^{(j)}(x) \) for \( j = 0, \ldots, k \) (pure, NaN on error).
 
real(fp_real) function fitpack_curves::curve_derivative (this, x, order, ierr)
 Evaluate the k-th derivative at a single point (with optional error flag).
 
real(fp_real) function fitpack_curves::integral (this, from, to)
 Compute the definite integral \( \int_a^b s(x)\,dx \) via splint.
 
subroutine fitpack_curves::fourier_coefficients (this, alpha, a, b, ierr)
 Compute Fourier sine and cosine coefficients of the spline.
 
real(fp_real) function, dimension(:), allocatable fitpack_curves::zeros (this, ierr)
 Find all real zeros of a cubic spline \( s(x) = 0 \).
 
subroutine fitpack_curves::grow_knot_storage (this)
 Grow the knot and coefficient arrays when storage is insufficient.
 
subroutine fitpack_curves::curve_insert_knot_one (this, x, ierr)
 Insert a single knot into the B-spline representation.
 
subroutine fitpack_curves::curve_insert_knot_many (this, x, ierr)
 Insert multiple knots into the B-spline representation.
 
elemental integer(fp_size) function fitpack_curves::curve_comm_size (this)
 Return the communication buffer size (number of FP_COMM elements).
 
pure subroutine fitpack_curves::curve_comm_pack (this, buffer)
 Pack curve data into a communication buffer for parallel transfer.
 
pure subroutine fitpack_curves::curve_comm_expand (this, buffer)
 Expand curve data from a communication buffer.
 

Variables

integer, parameter fitpack_curves::max_k = 5