API reference

ConvolutionInterpolations.jl

Every entry below is the docstring of the installed package, printed at render time, so this page is as current as the version the site was rendered against (shown on the Julia page).

Functions

convolution_interpolation

convolution_interpolation(knots, values::AbstractArray{T,N}; kwargs...) where {T,N}

Create a convolution-based interpolation object with automatic optimization and boundary handling.

Arguments

  • knots: Vector or range (1D) or tuple of vectors/ranges (N-D) of grid coordinates.
  • values: Array of values at the grid points.

Keyword Arguments

  • kernel::Symbol=:auto: Convolution kernel to use (default is N-dependent to reflect tensor product cost).

    • a-series: :a0 (nearest), :a1 (linear), :a3 (cubic), :a4 (quartic), :a5 (quintic), :a7 (septic)
    • b-series: :b5, :b7, :b9, :b11, :b13
    • :n3 (cubic): the nonuniform implementation of :a3. :a3 and :n3 are interchangeable — a uniform grid always evaluates with the fast :a3 kernel, a nonuniform grid with the :n3 weights, whichever name is given.

    :a0, :a1, and all b-series kernels work on both uniform and nonuniform grids. :a3 falls back to :n3 on nonuniform grids (same order, nonuniform weights). :a4, :a5 and :a7 are uniform-only and raise an error on nonuniform grids.

  • fast::Bool=true: Use the fast uniform-grid evaluation (exact kernel weights from the kernels’ polynomial pieces, O(1) per evaluation). Automatically disabled for nonuniform grids.

  • precompute: Deprecated, has no effect, and will be removed in a future release. Kernels are evaluated exactly, so no kernel tables are precomputed.

  • B::Float64=-1.0: If a positive value is provided, uses Gaussian kernel with parameter B for C∞ smoothness.

  • extrap=:throw: Behavior outside the grid domain. Options: :throw, :flat, :line or :natural.

  • bc=:detect: Boundary condition for kernel evaluation at domain edges. Options: :detect, :poly, :linear, :quadratic.

  • derivative::Union{Int,NTuple{N,Int}}=0: Derivative order to evaluate, one value for all dimensions or one per dimension. Supported up to 6 for b-series kernels. derivative=-m evaluates the m-fold antiderivative, anchored at zero at the leftmost interior knot (uniform grids, fast path), up to order 2 for :a0/:a1, 4 for the other a-series kernels, 6 for :b5 and 8 for :b7–:b13. Orders may be mixed per dimension, e.g. (-2, 0) or (-1, 1).

  • subgrid: Deprecated, has no effect, and will be removed in a future release. Kernels are evaluated exactly, so there is no subgrid interpolation.

  • lazy::Union{Nothing,Bool}=nothing: When true, skip ghost point expansion at construction time. Ghost values are computed on the fly only when evaluating near boundaries, with exactly the values eager expansion would store, saving memory and construction time. When false, all ghost points are expanded at construction. The default, nothing, chooses lazy mode on uniform grids (fast path, no antiderivatives) when eager expansion would build more than 2²⁷ coefficients (1 GiB in Float64) or compute more than 2²⁴ ghost points (roughly a second of construction), and eager mode otherwise.

  • boundary_fallback: Deprecated, has no effect; will be removed in v1.0. Lazy interpolants compute the same boundary ghost values as eager ones, in every dimension.

Returns

A ConvolutionExtrapolation object callable at arbitrary points within (or, depending on extrap, outside) the grid domain.

Performance

  • Construction: ~3μs for 1D with 100 points (:a4 kernel, lazy=false). With lazy=true, construction is faster as ghost point expansion is skipped.
  • Evaluation (1D): :a1 ~3ns, :a4 ~10ns, :b5 ~14ns per query, O(1) and allocation-free. Boundary evaluation in lazy mode is slightly slower.

Examples

# 1D interpolation
x = range(0, 2π, length=50)
itp = convolution_interpolation(x, sin.(x))
itp(1.0)

# 2D with lazy construction
x = range(0, 1, length=100)
y = range(0, 1, length=100)
vals = [sin(2π*xi)*cos(2π*yi) for xi in x, yi in y]
itp = convolution_interpolation((x, y), vals, lazy=true)
itp(0.3, 0.7)

# First derivative
itp_d = convolution_interpolation(x, sin.(x), derivative=1)
itp_d(1.0)  # ≈ cos(1.0)

# High-dimensional with lazy mode (recommended)
knots_5d = ntuple(_ -> range(0, 1, length=20), 5)
vals_5d = rand(20,20,20,20,20)
itp = convolution_interpolation(knots_5d, vals_5d, lazy=true)
itp(0.5, 0.5, 0.5, 0.5, 0.5)

See also: FastConvolutionInterpolation, ConvolutionInterpolation, ConvolutionExtrapolation.

convolution_interpolation(points::AbstractMatrix, values::AbstractVector; kwargs...)

Scattered-data convolution interpolation. Each column of points is one data point (D x Np); values holds the corresponding data values.

Fits the data with fit_scattered and wraps the fitted grid in the standard interpolant, so evaluation, derivatives, and integrals work exactly as for gridded data. The default mode = :smooth smooths the data with the smoothing chosen automatically, which suits measured, noisy data (to see the chosen lambda and the estimated noise, call fit_scattered directly); for trusted, noise-free data use mode = :exact, whose interpolant passes through the data. Unlike the gridded constructors, which always interpolate, the scattered path smooths by default, because scattered data are usually measurements. All fit_scattered keyword arguments are accepted, including grid, alpha and ratio for adaptive or user-supplied knot axes, plus derivative, which is forwarded to the interpolant, and extrap. The deprecated precompute and subgrid keywords are still accepted and forwarded, but have no effect. On a uniform grid the boundary condition is fixed to :poly for consistency with the fit; on a nonuniform grid the interpolant’s own ghost extrapolation is the one the fit used. A nonuniform grid gives a nonuniform interpolant (:n3 by default for :smooth, :b5 for :exact): no antiderivatives (derivative = -1), and lazy only with :n3.

pts = rand(2, 500)                                        # 500 scattered points in 2D, one per column
vals = [sin(3p[1]) * cos(2p[2]) for p in eachcol(pts)]    # the signal at the points
noisy = vals .+ 0.05 .* randn(500)                        # measured with noise
itp = convolution_interpolation(pts, noisy)               # smoothing chosen automatically
itp(0.4, 0.6)                                             # close to the noise-free value

itp_x = convolution_interpolation(pts, vals; mode = :exact)   # noise-free data: interpolate exactly
itp_x(0.4, 0.6)                                           # evaluate anywhere inside the data's box

itp_a = convolution_interpolation(pts, vals; mode = :exact, grid = :adaptive)   # knots follow the point density

fit_scattered

fit_scattered(points, values; kwargs...)

Fit scattered data with a convolution interpolant on a grid over the data’s bounding box.

The tensor-product kernel basis lives on a grid covering the data’s bounding box: uniform by default, or, with grid = :adaptive, with per-axis knots that follow the density of the points. Ghost coefficients are eliminated before the solve using the package’s polynomial boundary condition (the Vandermonde ghost extrapolation of the nonuniform kernels on nonuniform grids), so the solution is a completed grid consistent with bc = :poly. Because the kernels are cardinal on the grid, the fitted interior coefficients are the interpolant’s values at the interior knots: fit_scattered returns exactly the (knots, values) pair the gridded constructors consume.

Two modes:

  • :smooth (default) smooths: it minimizes (1/n)·‖A c − f‖² + lambda·Σ_d ∫|∂_d^q s|², the mean squared misfit plus lambda times the roughness (in coordinates normalized to the bounding box, so lambda does not depend on the grid or the units of each axis). By default lambda is chosen by generalized cross-validation, so no smoothing parameter needs to be tuned. For measured data, which usually carry some noise; on noise-free data it approaches interpolation, less accurately than :exact. Needs more data points than the penalty’s null space has dimensions: q^D, i.e. 125 in 3D with the default q = 5.
  • :exact interpolates: the fit passes through every data point to machine precision, and among the admissible grids the one minimizing a q-th order roughness seminorm is selected. For trusted, noise-free data only: noise is reproduced exactly and amplified between the points, most of all in derivatives.

Arguments

  • points::AbstractMatrix: D x Np matrix; each column is one data point.
  • values::AbstractVector: Np data values.

Keyword Arguments

  • kernel::Union{Symbol,NTuple{D,Symbol}}=:auto: on a uniform grid any kernel with a polynomial boundary-condition table (:a3, :a4, :a5, :a7, :b5…:b13); on a nonuniform grid (grid = :adaptive or user axes) :n3 or a :b kernel, the kernels that support nonuniform grids. :auto uses the scattered-path default. Uniform grid, :smooth: :a4 in every dimension. With noisy data the accuracy is set by the noise and the roughness order rather than the kernel, and :a4’s narrow stencil makes the fit 2-3x faster than :b5 in 2D and 3-9x in 3D at comparable accuracy; at a knot budget too small to resolve the signal, :b5 is the more accurate choice. Uniform grid, :exact: :b5 for 1-3D (measured to be both the fastest and the deepest-converging choice with the default solver), :a4 for 4-5D, :a3 above. Note this differs from the gridded default (:b7 for 1-2D): for scattered data the boundary-condition tables cap all b-kernels at degree-7 reproduction, and :b5’s shallower ghost extrapolation gives it the lowest roundoff floor under :cholesky. Nonuniform grid: :n3 for :smooth (the counterpart of :a4: closed-form weights, a 4-wide stencil and no per-interval precompute) and :b5 for :exact. Interpolate the fitted grid with the fitting kernel.
  • mode::Symbol=:smooth: :smooth or :exact (see above).
  • grid::Union{Symbol,Tuple}=:uniform: the knot axes. :uniform is the uniform grid over the bounding box. :adaptive places the knots of each axis at the quantiles of the points’ coordinates along that axis, blended with the uniform knots by alpha and with the ratio of adjacent spacings capped at ratio, so a dense band of points gets a dense band of knots. This is what lets :exact interpolate clustered points at all, and lets :smooth resolve a boundary layer, a step or a log-scaled axis at a knot count a uniform grid cannot. The grid is still a tensor product, so it helps when the point density is roughly separable along the axes, not for isolated clusters; in two or more dimensions points can still share a cell where the clusters of several axes overlap, and oversample is the remedy. A tuple of strictly increasing knot vectors, one per axis, is used as given; the vectors must cover the data. Nonuniform grids give a nonuniform interpolant: no antiderivatives (derivative = -1) and lazy only with :n3. With the :b kernels construction costs one exact-arithmetic projection per interval, so keep their knot counts modest; :n3 has no such cost.
  • alpha::Real=1.0, ratio::Real=2.0 (grid = :adaptive only): the blend between uniform (0) and quantile (1) knots, and the largest allowed ratio of adjacent knot spacings. The cap keeps the nonuniform kernels and their ghost extrapolation well conditioned; raise it for strongly graded data.
  • gridsize::Union{Symbol,Int,NTuple{D,Int}}=:auto: interior knots per dimension. An Int or tuple is used as given in both modes. With :auto, both modes size the grid from oversample and the data count. :smooth uses that grid directly rather than a coarser one: a grid that cannot represent part of the signal absorbs it into the residual, where nothing in the fit reveals it, while the smoothing itself is set by lambda, not by the knot count. With user axes the knot counts are those of the axes, and gridsize must be :auto.
  • oversample::Real=0.0: grid knots per data spacing when gridsize=:auto. 0.0 selects the mode default: 0.8 for :smooth; for :exact 1.6 in 1D, 2.5 in 2D and 2.0 in 3D and above, since random points in two or more dimensions share a grid cell often enough at the 1D density that the fit goes least-squares. Points closer together than the local knot spacing cannot be interpolated separately on any grid; if :exact warns, raise oversample. :smooth warns when the fitted smoothing would need a finer grid than this allows (about eight knots per cycle of its cutoff): the fit may then be under-resolved, and a larger oversample helps.
  • q::Union{Int,Symbol}=:auto: roughness (difference) order of the seminorm. :auto uses, for :smooth, 5 for every kernel (higher orders make the smoothing system ill-conditioned, lower orders are less accurate); for :exact, the ghost extrapolation’s stencil width minus one (5 for :b5, 7 for :b7-class tables), which preserves the kernel’s convergence order in data gaps. On nonuniform grids the roughness is discretised by divided differences scaled to plain differences on the local spacing, with the same defaults except that :n3’s :exact default is 2, matching its three-knot ghost extrapolation. For data that oscillate everywhere (a chirp) no q smooths without biasing the signal, and GCV then leaves lambda near zero: the knot count is the regulariser in that case.
  • lambda::Union{Symbol,Real}=:gcv (:smooth only): the smoothing parameter, or :gcv to choose it by generalized cross-validation. The lambda returned by a fit reproduces that fit when passed back.
  • solver::Symbol=:cholesky (:exact only): :cholesky (default) factors the Jacobi-equilibrated SPD normal system with CHOLMOD: fast, and with the default :b5 kernel it is truncation-limited (no visible roundoff floor down to ~3e-11 in 2D benchmarks). :qr solves each multiplier iteration as a sparse least-squares problem via SPQR without forming normal equations; it is several times slower but lowers the roundoff floor of the wide kernels (measured 2D floors: :b7 ~5e-12 and still converging, :b9 ~1e-11, :b11 ~6e-10, :b13 ~3e-9). Use solver=:qr, kernel=:b7 when chasing the deepest accuracy. The :nullspace solver solves for the coefficients exactly, but is only feasible on small meshes (few points).
  • W::Real=1e6 (:exact only): augmented-Lagrangian penalty weight.
  • iters::Int=20, tol::Real=1e-11 (:exact only): multiplier iteration controls; convergence typically takes 1-2 iterations.
  • verbose::Bool=false: :exact prints the constraint violation per iteration; :smooth prints the grid, lambda, cutoff, effective degrees of freedom and estimated noise of the fit.

Returns

(knots, vals, third): the tuple of interior knot axes (ranges for a uniform grid, vectors otherwise), the array of fitted interior grid values, and

  • for :smooth, (lambda = λ, noise = σ): the smoothing parameter used and the estimated standard deviation of the data about the fit, √(‖A c − f‖² / (n − edf)) with edf the fit’s effective degrees of freedom;
  • for :exact, viol: the final maximum constraint violation.

Construct an interpolant with convolution_interpolation(knots, vals; kernel, bc=:poly, ...), or use convolution_interpolation(points, values) which does this directly.

Notes: :exact solves a sparse SPD system (CHOLMOD for Float64, dense Cholesky otherwise). Exact interpolation requires distinct data points with consistent values; duplicated points with conflicting values are resolved in the least-squares sense and reported through viol. :smooth always solves in Float64 (its accuracy is limited by the noise) and casts the fitted grid back to the element type of the data. On nonuniform grids the kernel weights are Float64, as in the nonuniform interpolant itself.

convolution_smooth

convolution_smooth(knots, values, B)

Apply separable Gaussian smoothing to values on the uniform grid knots. Returns an array of the same size as values with noise reduced.

Arguments

  • knots: grid — an AbstractVector (1D) or NTuple{N,AbstractVector} (ND)
  • values: array of values to smooth, must have size(values, d) == length(knots[d])
  • B: Gaussian width parameter. Larger B means a narrower kernel (less smoothing), smaller B means a wider kernel (more smoothing). B ≤ 0.1 recommended for effective noise reduction.

Returns

Array of smoothed values, same size and element type as values.

Performance

Smoothing is separable and allocation-free in the inner loop. The Gaussian kernel weights are precomputed once per call — exp is evaluated only 2*eqs+1 times regardless of grid size or dimension:

Grid B=0.02 B=0.05 B=0.1
1D n=1000 22 μs 13 μs 9.6 μs
2D 200² 1.7 ms 0.99 ms 0.72 ms
3D 50³ 9.3 ms 5.7 ms 4.4 ms
4D 40⁴ 273 ms 206 ms 169 ms

Examples

# 1D smoothing
x = range(0.0, 2π, length=500)
y_noisy = sin.(x) .+ 0.1.*randn(500)
y_smooth = convolution_smooth(x, y_noisy, 0.05)

# 2D smoothing
x = range(0.0, 2π, length=200)
y = range(0.0, 2π, length=200)
z_noisy  = [cos(xi)*sin(yi) for xi in x, yi in y] .+ 0.1.*randn(200,200)
z_smooth = convolution_smooth((x,y), z_noisy, 0.02)

See also: convolution_gaussian, convolution_interpolation

convolution_gaussian

convolution_gaussian(knots, values, B)
convolution_gaussian(knots, values, B; extrap)

Construct a Gaussian smoothing interpolant from values on the uniform grid knots. Unlike convolution_smooth which returns an array, this returns an interpolant that can be evaluated at arbitrary locations.

Unlike polynomial convolution kernels which interpolate exactly through data points, the Gaussian kernel smooths: it produces a weighted average of nearby values controlled by B. Useful for noisy data where exact interpolation is undesirable.

Arguments

  • knots: grid — an AbstractVector (1D) or NTuple{N,AbstractVector} (ND)
  • values: array of values, must have size(values, d) == length(knots[d])
  • B: Gaussian width parameter. Larger B means narrower kernel (less smoothing), smaller B means wider kernel (more smoothing). B ≤ 0.1 recommended.

Keyword Arguments

Returns

A ConvolutionExtrapolation interpolant supporting evaluation at arbitrary locations.

Examples

x = range(0.0, 2π, length=100)
y_noisy = sin.(x) .+ 0.1.*randn(100)

itp = convolution_gaussian(x, y_noisy, 0.05)
itp(1.5)         # evaluate at arbitrary point
itp.(x)          # evaluate on original grid — smoothed values

# 2D
xs = range(0.0, 2π, length=50)
ys = range(0.0, 2π, length=50)
z_noisy = [sin(x)*cos(y) for x in xs, y in ys] .+ 0.1.*randn(50,50)
itp2 = convolution_gaussian((xs,ys), z_noisy, 0.05)
itp2(1.0, 2.0)   # evaluate at arbitrary 2D point

See also: convolution_smooth, convolution_interpolation

convolution_resample

convolution_resample(knots_in, knots_out, values)
convolution_resample(knots_in, knots_out, values; kernel, derivative, bc)

Resample values from the uniform grid knots_in to the uniform grid knots_out using high-order separable convolution interpolation.

Arguments

  • knots_in: input grid — an AbstractVector (1D) or NTuple{N,AbstractVector} (ND)
  • knots_out: output grid — same format as knots_in
  • values: array of values on knots_in, must have size(values, d) == length(knots_in[d])

Keyword Arguments

  • kernel: convolution kernel, default :b13. A Symbol applies to all dimensions; an NTuple{N,Symbol} specifies per-dimension kernels. See [Kernel Reference] for options.
  • derivative: derivative order, default 0. An Int applies to all dimensions; an NTuple{N,Int} specifies per-dimension orders. Negative values compute antiderivatives.
  • bc: boundary condition, default :detect. See [Boundary Conditions] for options.
  • subgrid, precompute: deprecated, have no effect, and will be removed in a future release. Kernels are evaluated exactly, so there are no precomputed tables or subgrid interpolation.

Default kernels by dimension

The convenience wrappers (called without keywords) use dimension-appropriate defaults:

  • 1D, 2D, 3D to 10D: :b13

Returns

Array of resampled values with size(result, d) == length(knots_out[d]).

Performance

Resampling is separable — each dimension is processed independently in a single pass. Allocation count is independent of grid size, and the function is fully type stable when called via the convenience wrappers. For grid-to-grid operations this is significantly faster than constructing a full interpolant and evaluating at each point:

Grid convolution_resample construct + eval Speedup
1D 500→1000 22 μs 29 μs 1.3×
2D 100²→200² 1.9 ms 7.0 ms 3.6×
3D 30³→60³ 8.9 ms 127 ms 14×

Examples

# 1D resampling
x_coarse = range(0.0, 2π, length=20)
x_fine   = range(0.0, 2π, length=200)
y_coarse = sin.(x_coarse)
y_fine   = convolution_resample(x_coarse, x_fine, y_coarse)

# 2D resampling
xs = range(0.0, 2π, length=20)
ys = range(0.0, 2π, length=20)
z  = [sin(x)*cos(y) for x in xs, y in ys]
xs_fine = range(0.0, 2π, length=100)
ys_fine = range(0.0, 2π, length=100)
z_fine  = convolution_resample((xs, ys), (xs_fine, ys_fine), z)

# Resample and differentiate in one pass
z_dx = convolution_resample((xs, ys), (xs_fine, ys_fine), z; derivative=(1, 0))

See also: convolution_interpolation, convolution_smooth

Types

ConvolutionInterpolation

ConvolutionInterpolation{T,N,TCoefs<:AbstractArray,IT<:NTuple{N,ConvolutionMethod},
                         Axs<:Tuple,KA,DT,DG,EQ,KBC} <: AbstractConvolutionInterpolation{T,N,TCoefs,IT,Axs,KA,DT,DG,EQ,KBC}

A structure that implements convolution-based interpolation on N-dimensional data.

Type Parameters

  • T: The element type of the interpolated values
  • N: The number of dimensions
  • TCoefs: The type of the coefficient array
  • IT: The tuple of interpolation methods for each dimension
  • Axs: The type of the knot points (typically a tuple of ranges)
  • KA: The kernel type (ConvolutionKernel{DG} or GaussianConvolutionKernel{B})
  • DT: The dimension type (Val{N} for N≤3, HigherDimension{N} otherwise)
  • DG: The kernel type (Val{degree})
  • EQ: The equation order type
  • NB: The type of nonuniform b-kernel precomputed weight coefficients

Fields

  • coefs::TCoefs: The coefficient array with boundary extensions
  • knots::Axs: The knot points for each dimension
  • it::IT: The tuple of interpolation methods
  • h::NTuple{N,Float64}: The step size in each dimension
  • kernel::KA: The convolution kernel
  • dimension::DT: Type for dimension-specific dispatch
  • deg::DG: The degree of the interpolation
  • eqs::EQ: The number of equations used in the boundary conditions
  • nb_weight_coeffs::NB: Precomputed polynomial weight coefficients for nonuniform b-kernel interpolation (per dimension). nothing for uniform grids and non-b kernels. When active, is an NTuple{N, Vector{Matrix{Float64}}} where each element holds per-interval polynomial coefficients for one dimension.
  • lazy::Bool: If true, no ghost points are computed, and are instead computed on the fly.

This implementation evaluates the convolution kernel at each point directly, providing accurate results but potentially slower performance than FastConvolutionInterpolation.

FastConvolutionInterpolation

FastConvolutionInterpolation{T,N,NI,TCoefs<:AbstractArray{T,N},
                             Axs<:Tuple,KA,DT,DG,EQ,KBC,DOT,FD,SD,SG,LZ,DI,SZ} <:
    AbstractConvolutionInterpolation{T,N,NI,TCoefs,Axs,KA,DT,DG,EQ,KBC,DOT,FD,SD,SG,LZ,DI,SZ}

Convolution interpolation on uniform grids with O(1) evaluation. Kernel weights are computed exactly from each kernel’s polynomial pieces (see _column_rows), so evaluation is exact to rounding for every kernel, derivative and integral order.

Type Parameters

  • T: Element type of the interpolated values
  • N: Number of dimensions
  • NI: Number of integral dimensions (derivative order −1)
  • TCoefs: Type of the coefficient array
  • Axs: Type of the knots (typically a tuple of ranges)
  • KA: Kernel type per dimension (nothing for polynomial kernels)
  • DT: Dimension type for dispatch (Val{N} for N ≤ 3, HigherDimension{N} otherwise)
  • DG: Kernel symbol type for dispatch (e.g. HigherOrderKernel{(:b5, :b5)})
  • EQ: Kernel stencil half-widths per dimension
  • KBC: Boundary condition type
  • DOT: Derivative order type
  • FD, SD: Unused placeholders (Nothing), shared with ConvolutionInterpolation
  • SG: Unused placeholder (Val{:not_used}), shared with ConvolutionInterpolation
  • LZ: Lazy mode flag (Val{true} or Val{false})
  • DI: Integral dimension type for dispatch
  • SZ: Type of the data domain size

Fields

  • coefs::TCoefs: Coefficients, extended with ghost points (eager mode) or raw values (lazy mode)
  • domain_size::SZ: Size of the original data array
  • knots::Axs: Knots of each dimension, extended with ghost knots in eager mode
  • h::NTuple{N,T}: Grid spacing per dimension
  • x0::NTuple{N,T}: First (extended) knot per dimension
  • kernel::KA: Kernel type per dimension
  • dimension::DT: Dimension type for dispatch
  • kernel_sym::DG: Kernel symbols for dispatch
  • eqs::EQ: Kernel stencil half-widths per dimension
  • bc::KBC: Boundary conditions per dimension
  • derivative_order::DOT: Derivative orders per dimension
  • kernel_d1_pre::FD, kernel_d2_pre::SD: Unused placeholders (nothing)
  • subgrid::SG: Unused placeholder (Val(:not_used))
  • lazy::LZ: If Val(true), ghost points are computed on the fly near the boundaries
  • anchor::NTuple{N,T}: Point where antiderivatives are zero, per integral dimension
  • dim_integral::DI: Integral dimension type for dispatch
  • integral_taylor::NTuple{N,Matrix{T}}: For each integral dimension of order m, the exact values K*{m−r}(eqs − j) of the coefficients near the anchor (see *anchor*taylor*table)
  • integral_entries::NTuple{N,Matrix{T}}: For each integral dimension, the exact polynomials (in the position within the cell) that near-anchor coefficients contribute left of the stencil
  • integral_tails::Vector{Vector{Array{T,N}}}: For at most 3 integral dimensions, the left tails of every region: entry mask holds one array per combination of powers of the positions within the cell (see _build_region_tails)

ConvolutionExtrapolation

ConvolutionExtrapolation{T,N,ITPT<:AbstractConvolutionInterpolation,ET,O}

A structure that combines a convolution interpolation with boundary condition extrapolation techniques.

Type Parameters

  • T: The data type of the interpolated values
  • N: The dimensionality of the data (number of dimensions)
  • ITPT: The specific type of convolution interpolation being used
  • ET: The boundary condition extrapolation technique
  • O: The order of the interpolation

Fields

  • itp::ITPT: The underlying interpolation object
  • et::ET: The extrapolation technique (boundary condition)

Details

This structure extends the functionality of convolution interpolation objects by defining behavior for points outside the domain of the original data through various extrapolation techniques.

When called as a function, the object automatically determines whether the requested point is within the interpolation domain. If so, it uses direct interpolation; if not, it applies the specified boundary condition to handle the extrapolation.