Add missing matrix support for AkimaInterpolation and QuadraticSpline#467
Open
ChrisRackauckas-Claude wants to merge 3 commits intoSciML:masterfrom
Open
Conversation
Fixes SciML#206 by implementing matrix dispatch methods that were missing: - Add AbstractMatrix constructor for AkimaInterpolation - Add AbstractMatrix constructor for QuadraticSpline - Add AbstractMatrix _interpolate method for AkimaInterpolation - Add AbstractMatrix _interpolate method for QuadraticSpline Now all interpolation methods have consistent matrix support: ✓ LinearInterpolation, QuadraticInterpolation, LagrangeInterpolation, ConstantInterpolation (already worked) ✓ AkimaInterpolation, QuadraticSpline (newly fixed) ✓ CubicSpline (already worked) The matrix interface allows interpolating multiple functions simultaneously, where each row of the matrix represents a different function evaluated at the same time points. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive matrix tests for AkimaInterpolation and QuadraticSpline - Include edge cases: single row matrices, larger matrices, different extrapolation settings - Add missing _integral methods for AkimaInterpolation and QuadraticSpline with matrices - Fix QuadraticSpline matrix interpolation to handle parameter computation properly - All matrix tests now pass, ensuring consistent interface across interpolation methods Test coverage includes: ✓ Matrix interpolation at original and intermediate points ✓ Matrix extrapolation functionality ✓ Output dimensions and sizes verification ✓ Edge cases with single row and larger matrices ✓ Parameter caching compatibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…ine constructors - Add Vector of Vectors support for AkimaInterpolation by using norm() instead of abs() for vector differences - Fix BSplineInterpolation and BSplineApprox constructors to handle vector elements better - Add comprehensive Vector of Vectors tests for AkimaInterpolation - Improve arc length calculations for vector-valued data in BSpline methods Major interface consistency improvements: ✅ AkimaInterpolation: Now supports Vector, Matrix, and Vector of Vectors ✅ QuadraticSpline: Now supports Vector, Matrix, and Vector of Vectors ✅ All other methods: Already had comprehensive support This resolves the main interface inconsistency issues reported in SciML#206. BSpline Vector of Vectors support requires more complex architectural changes due to their linear algebra operations with mixed data types. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #206 by implementing missing matrix dispatch methods for
AkimaInterpolationandQuadraticSpline.Previously, only
LinearInterpolation,QuadraticInterpolation,LagrangeInterpolation, andConstantInterpolationsupported matrices. This PR adds matrix support to the remaining methods.Changes Made
AbstractMatrixconstructor and_interpolatemethodAbstractMatrixconstructor and_interpolatemethodMatrix Interface
The matrix interface allows interpolating multiple functions simultaneously, where each row of the matrix represents a different function evaluated at the same time points.
Example usage:
Test Results
All methods now have consistent matrix support:
Notes
absfunction not working with vector elements🤖 Generated with Claude Code