Releases: ProjectTorreyPines/FastInterpolations.jl
v0.4.4
What's New
Linear Adjoint Operator (1D + ND)
Matrix-free Wᵀȳ for linear interpolation, matching the cubic adjoint API. Supports all extrap modes, 1D and arbitrary-dimension grids. (#77)
Bug Fixes
- Mutation safety — Constructors now defensively copy grids/data. Zero-cost for
Rangeinputs. (#82) - ND NoExtrap pre-validation — Domain checks run before
@inboundseval loop. (#78)
Internal
- Unified 1D callable protocol via
AbstractInterpolant1D(#79) - AdaptiveArrayPools v0.3 API update (
unsafe_acquire!→acquire!)
What's Changed
- (feat): Linear Adjoint Operator (1D + ND) by @mgyoo86 in #77
- (fix): Pre-loop NoExtrap domain validation for all ND eval paths by @mgyoo86 in #78
- (refac): unify 1D callables & remove ND query protocol by @mgyoo86 in #79
- (fix): mutation safety — defensive copy in all constructors by @mgyoo86 in #82
Full Changelog: v0.4.3...v0.4.4
v0.4.3
What's New
Extensible Query Protocol for ND Evaluation
ND batch APIs now accept any query container type via a 3-function protocol — SVector, custom containers, etc. work out of the box. Sorted AoS queries automatically get LinearBinarySearch (~25–55% faster).
AbstractAdjointND Type Hierarchy
New abstract type for ND adjoint operators. CubicAdjointND now subtypes it; future adjoint operators inherit shared callables for free.
Internal
- –169 net lines: unified 8 duplicate SoA/AoS batch methods into protocol-based paths
- Zero-alloc AD pullback paths (ChainRules/Enzyme)
What's Changed
Full Changelog: v0.4.2...v0.4.3
v0.4.2
What's New
Cubic Adjoint Operator — Matrix-Free Wᵀȳ
Native matrix-free adjoint for 1D and ND cubic spline interpolation. Computes f̄ = Wᵀȳ without materializing the weight matrix — O(n+m) with zero allocation (in-place). Enables efficient ∂loss/∂data for inverse problems, data assimilation, and PDE-constrained optimization.
Zygote and Enzyme use the adjoint operator automatically via registered AD rules — ∂loss/∂data works out of the box.
# Build once (query-baked, data-free)
adj = cubic_adjoint(x, xq)
f̄ = adj(ȳ) # allocating
adj(f̄, ȳ) # in-place, zero-alloc
# AD backends use it automatically
using Zygote
grad = Zygote.gradient(f -> sum(cubic_interp(x, f, xq)), f)[1]1D Adjoint Docs 📖 · ND Adjoint Docs 📖 (#69, #71)
value_gradient
Computes value and gradient in a single call with one interval search. Zero-allocation on tuple queries. Works with all ND interpolant types.
Bug Fixes
- Exclusive periodic BC type instability — inline
isabranch replaces_extend_gridUnion return (#64) - Mixed-precision FillExtrap/ClampExtrap — OOB path now promotes result to match kernel return type via arithmetic (#74)
What's Changed
- Fix/type stability exclusive periodic by @mgyoo86 in #64
- (ci): Two-tier benchmark regression verification with auto re-runs by @mgyoo86 in #65
- Streamline plots by @JeffFessler in #66
- Tweak benchmark readme by @JeffFessler in #67
- (feat):
CubicAdjointoperator for 1D cubic spline interpolation by @mgyoo86 in #69 - (feat): CubicAdjointND — N-Dimensional Cubic Adjoint Operator by @mgyoo86 in #71
- (feat): new
value_gradientAPI for ND Interpolants by @mgyoo86 in #73 - Fix mixed-precision type instability in FillExtrap/ClampExtrap OOB paths by @mgyoo86 in #74
Full Changelog: v0.4.1...v0.4.2
v0.4.1
New: FillExtrap(v)
Returns a user-specified constant for out-of-domain queries. (Docs 📖)
itp = cubic_interp(x, y; extrap=FillExtrap(NaN)) # 1D
itp = cubic_interp((x, y), data; extrap=FillExtrap(0.0)) # ND
itp = cubic_interp(x, y; extrap=Extrap(:fill; fill_value=NaN)) # factory-style Deprecation: ConstExtrap → ClampExtrap
Renamed to better reflect its behavior (clamp to boundary value). Old names remain functional with depwarn. (Docs 📖)
| Deprecated | Replacement |
|---|---|
ConstExtrap() |
ClampExtrap() |
Extrap(:constant) |
Extrap(:clamp) |
Bug Fixes
- ND autodiff TypeError — ChainRulesCore extension updated for
DerivOpAPI (was still passingInttuples) (Docs 📖) - AD generalized to all methods —
frule/rrulenow dispatch onAbstractInterpolant/AbstractInterpolantND, not just Cubic (Docs 📖) - Complex-valued pullback — corrected adjoint to
real(conj(Δy) * f'(x))forf: R → C
Style
- Applied Runic.jl formatting (173 files) + added CI enforcement workflow
What's Changed
- (feat): Rename
ConstExtrap→ClampExtrapand addFillExtrapby @mgyoo86 in #61 - (fix): ChainRulesCore extension + improve AD docs by @mgyoo86 in #62
- (style): Apply Runic formatting and add CI check by @mgyoo86 in #63
Full Changelog: v0.4.0...v0.4.1
v0.4.0
⚠️ Breaking Changes
1. Multi-series API changed
Passing bare Matrix or Vector{Vector} to create a SeriesInterpolant is no longer supported. Use the Series() wrapper:
# Before
itp = cubic_interp(x, [y1, y2])
# After (v0.4)
itp = cubic_interp(x, Series(y1, y2))2. PeriodicBC() strict endpoint check
The default :inclusive mode now checks y[1] == y[end] (strict) instead of isapprox. This catches silent data errors from floating-point periodic data (e.g., sin(2π) ≈ -2.4e-16 ≠ 0.0). Ensure your periodic data satisfies y[1] === y[end] exactly.
📖 See details:
New Features
Custom value types
- Any vector-space type (
SVector, measurement types, etc.) that supports+,-,*now works across all interpolation methods, BCs, derivatives, and ND paths. (docs)
Adjoint AD (∂f/∂y)
- Compute derivatives with respect to data values via
ForwardDiff, enabled by the custom value type support above. (docs)
What's Changed
- Introduce
Serieswrapper for multi-series interpolation by @mgyoo86 in #53 - Support custom value types (Duck-typing) by @mgyoo86 in #54
- Add
Aqua.jlQuality Assurance by @mgyoo86 in #57
Full Changelog: v0.3.1...v0.4.0
v0.3.1
New Feature
Adds a lazy-loaded extension for Symbolics.jl / ModelingToolkit.jl users — FastInterpolations interpolants can now be used directly inside symbolic expressions with derivative chain rule support.
- Symbolics.jl bridge (
FastInterpolationsSymbolicsExt): enablesSymbolics.jlusers to call 1D/ND interpolants in symbolic contexts, withexpand_derivativesresolving derivative chain rules automatically. No impact on non-Symbolics workflows.
What's Changed
- Add Symbolics.jl extension for ModelingToolkit.jl compatibility by @ChrisRackauckas-Claude in #51
Full Changelog: v0.3.0...v0.3.1
v0.3.0
FastInterpolations.jl v0.3.0
v0.3.0 completes the migration from Symbol-based APIs to fully typed dispatch, unifies derivative specification, and introduces factory functions for ergonomic API access.
This is a major breaking release. For detailed before/after examples and search-replace patterns, see the Migration Guide.
⚠️ Breaking Changes
- Extrapolation:
extrap=:symbolremoved — useExtrap(:extend)orExtendExtrap()directly - Side selection:
side=:symbolremoved — useSide(:left)orLeftSide()directly - Derivatives:
deriv=Int/Valremoved — useDerivOp(n)or aliases (EvalDeriv1(), etc.) - BC renames:
NaturalBC→ZeroCurvBC,ClampedBC→ZeroSlopeBC - BC default: cubic interpolation now defaults to
CubicFit()(wasZeroCurvBC()) - Search renames:
Binary→BinarySearch,Linear→LinearSearch,LinearBinary→LinearBinarySearch - Search removal:
HintedBinarySearchremoved — useLinearBinarySearch(linear_window=0)
New Features
- Factory functions:
Search(:binary),Extrap(:extend),Side(:left)— zero-allocation, type-stable convenience API with ND variadic form (Extrap(:extend, :none, :wrap)) - AutoSearch: adaptive default that resolves to
BinarySearch(scalar) orLinearBinarySearch(sorted vector) per query — up to ~5x faster for sorted batch queries - DerivOp{N}: unified parametric type for derivative specification with ND convenience constructor
DerivOp(1, 0)
What's Changed
- (breaking): remove legacy Symbol extrapolation API by @mgyoo86 in #40
- (breaking): new
AbstractSideAPI replacing old Symbol-based API by @mgyoo86 in #41 - (refactor!): replace deriv::Int with DerivOp{N} parametric dispatch by @mgyoo86 in #42
- (refac!): Rename BC types and change default cubic BC to CubicFit by @mgyoo86 in #43
- (feat): new
AutoSearchpolicy as an adaptive default search policy by @mgyoo86 in #44 - (refac!): Remove
HintedBinary, route Binary+hint toLinearBinaryby @mgyoo86 in #45 - (perf): Optimize LinearBinary search & adaptive AutoSearch by @mgyoo86 in #46
- (perf): Fix Range Grid Performance Regression in PR#46 by @mgyoo86 in #47
- (refac!): Normalize Search Resolution & Rename Search Policies by @mgyoo86 in #48
- (feat): Factory functions —
Search(),Extrap(),Side()by @mgyoo86 in #49
Full Changelog: v0.2.13...v0.3.0
v0.2.13
What's Fixed
PolyFit BC Type Stability
Fixed type instability when using any PolyFit boundary condition (CubicFit(), QuadraticFit(), or custom PolyFit{D}) with cubic_interp and CubicSeriesInterpolant.
What's Changed
Full Changelog: v0.2.12...v0.2.13
v0.2.12
What's Fixed
ND Interpolant Type Stability
Fixed type inference for all ND interpolant constructors (cubic_interp, quadratic_interp, linear_interp, constant_interp). Constructing an ND interpolant inside a function no longer causes boxing (heap allocation) — all constructors are now fully @inferred.
What's Improved
Typed Extrapolation Dispatch for 1D Interpolants
All 1D interpolants now store extrapolation mode as a compile-time type parameter (E<:AbstractExtrap), aligning with the ND pattern. This eliminates runtime macro branching in one-shot hot paths.
New typed extrap values: NoExtrap(), ConstExtrap(), ExtendExtrap(), WrapExtrap().
Warning: Symbol-based
extraparguments (:none,:constant,:extension,:wrap) are now deprecated. They remain functional in v0.2.x for backward compatibility, but will be removed in v0.3.0. Please migrate to the typedAbstractExtrapvalues listed above.
What's Changed
- (fix): ND interpolant type inference by @mgyoo86 in #37
- (refactor): typed AbstractExtrap dispatch for all 1D interpolants by @mgyoo86 in #38
Full Changelog: v0.2.11...v0.2.12
v0.2.11
What's New
Zero-Allocation ND One-Shot APIs
All four ND interpolation methods (constant, linear, quadratic, cubic) are now zero-allocation for one-shot calls, including mixed grids (Range + Vector) and periodic BCs. New *_interp!(out, grids, data, queries) in-place batch variants are also available for all four methods.
What's Changed
Full Changelog: v0.2.10...v0.2.11