rbf
Bindings to Multidimensional Interpolation with Radial Basis Functions by John Burkardt.
Documentation
Datatypes
RBFInterpolant
A record representing a radial basis function interpolant. Fields:
- rank
 - The spatial dimension
 - basis
 - The type of basis function used
 - scale
 - The scale factor for the basis functions
 - npoints
 - The number of data points
 - xpoints
 - The data points (f64vector)
 - weights
 - The computed weights (f64vector)
 
Procedures
[procedure] make-interpolant :: basis m scale xpoints ypoints -> RBFInterpolantCreates a new RBF interpolant. Parameters:
- basis
 - Symbol representing the basis function type:
 
- 'mq or 'multiquadratic: Multiquadratic basis - 'imq or 'inverse-multiquadratic: Inverse multiquadratic basis - 'tp or 'thin-plate: Thin plate spline basis - 'ga or 'gaussian: Gaussian basis
- m
 - Integer specifying the spatial dimension
 - scale
 - Real number specifying the scale factor. Should be larger than the typical separation between points, but smaller than the maximum separation.
 - xpoints
 - f64vector containing the data points (length should be m × number_of_points)
 - ypoints
 - f64vector containing the function values at the data points (length should equal number_of_points)
 
Returns a new <RBFInterpolant> record.
[procedure] eval-interpolant :: RBFInterpolant ipoints -> f64vectorEvaluates the interpolant at the specified points. Parameters:
- interpolant
 - An RBFInterpolant record created with make-interpolant
 - ipoints
 - f64vector containing the interpolation points (length should be m * number_of_interpolation_points)
 
Returns a f64vector containing the interpolated values at the specified points.
Examples
(import rbf srfi-4) ;; Create a 2D interpolant with 4 data points (define x-data (f64vector 0.0 0.0 0.0 1.0 1.0 0.0 1.0 1.0)) (define y-data (f64vector 0.0 0.0 0.0 1.0)) ;; Create an interpolant using Gaussian basis functions (define interpolant (make-interpolant 'ga 2 0.5 x-data y-data)) ;; Evaluate at a specific point (0.5, 0.5) (define query-point (f64vector 0.5 0.5)) (define result (eval-interpolant interpolant query-point)) ;; Print the result (print (f64vector-ref result 0))
About this egg
Author
Repository
https://github.com/iraikov/chicken-rbf
Version history
- 1.0
 - Initial release
 
License
Copyright 2019-2025 Ivan Raikov. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A full copy of the GPL license can be found at <http://www.gnu.org/licenses/>.