Skip to content

RadialBasisFunctions.jlMeshless Computing in Julia

Radial basis functions for operators, machine learning, and beyond.

RadialBasisFunctions.jl

Quick Start

julia
using RadialBasisFunctions, StaticArrays

# Scattered data
points = [SVector{2}(rand(2)) for _ in 1:500]
f(x) = sin(4x[1]) * cos(3x[2])
values = f.(points)

# Interpolation
interp = Interpolator(points, values)
interp(SVector(0.5, 0.5))

# Differential operators on scattered data
∇²  = laplacian(points)
= gradient(points)
∂x  = partial(points, 1, 1)       # ∂/∂x₁
∂²y = partial(points, 2, 2)       # ∂²/∂x₂²

∇²(values)                         # apply to data
(values)                          # Nx2 matrix

# Combine operators
mixed = ∂x + ∂²y                   # operator algebra

# Transfer data between point sets
target = [SVector{2}(rand(2)) for _ in 1:1000]
rg = regrid(points, target)
rg(values)                         # interpolated onto target

Supported Radial Basis Functions

TypeFormulaBest For
Polyharmonic Spline (PHS) where  General purpose, no shape parameter tuning
Inverse Multiquadric (IMQ)Smooth interpolation with tunable accuracy
GaussianInfinitely smooth functions

Installation

julia
using Pkg
Pkg.add("RadialBasisFunctions")

Requires Julia 1.10 or later.