Implement cubic Hermite interpolation with error handling#26
Merged
Conversation
- Added `InterpolationError` enum to represent various errors in interpolation routines. - Introduced linear interpolation functionality in `linear.rs` with error checks for finite values, duplicate abscissae, and out-of-range queries. - Created `QuantityHermiteInterpolable` trait for handling cubic Hermite interpolation over typed quantities in `quantity.rs`. - Implemented cubic Hermite interpolation logic in `CubicHermiteQuantityTable` and related structures. - Added scalar interpolation primitives in `scalar.rs`, including cubic Hermite segment evaluation. - Defined `HermiteInterpolable` trait for combining complete typed values in `traits.rs`. - Updated `lib.rs` to expose new interpolation functionalities. - Created comprehensive tests for interpolation functionalities, covering various scenarios including cubic polynomial reproduction, exact node evaluation, and error handling for out-of-range and duplicate abscissae.
…nhance traits - Removed `quantity.rs` and its associated types and traits for quantity-based cubic Hermite interpolation. - Updated `interpolation/mod.rs` to reflect the removal of quantity-related modules and restructured public exports. - Enhanced `traits.rs` to introduce `HermiteBasis` for better handling of cubic Hermite interpolation across different abscissas. - Modified `HermiteInterpolable` trait to work with the new `HermiteBasis` structure. - Updated implementations for `f64`, `Quantity<U>`, `Vector<F, U>`, and `Position<C, F, U>` to align with the new trait definitions. - Adjusted tests to remove references to quantity-based interpolation and ensure compatibility with the updated cubic Hermite table structure.
…d structures, update cubic Hermite references
- Introduced `AbscissaDelta` trait for scaling and diagnostics of abscissae. - Updated `InterpolationAbscissa` to use `AbscissaDelta` for delta calculations. - Enhanced error handling in `InterpolationError` to provide raw diagnostic values for out-of-range queries. - Refactored cubic Hermite interpolation to utilize typed `qtty::Quantity` for abscissae. - Improved documentation for clarity on usage and expectations. - Adjusted tests to reflect changes in abscissa handling and error reporting.
…e changelog with new interpolation module and features
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.
InterpolationErrorenum to represent various errors in interpolation routines.linear.rswith error checks for finite values, duplicate abscissae, and out-of-range queries.QuantityHermiteInterpolabletrait for handling cubic Hermite interpolation over typed quantities inquantity.rs.CubicHermiteQuantityTableand related structures.scalar.rs, including cubic Hermite segment evaluation.HermiteInterpolabletrait for combining complete typed values intraits.rs.lib.rsto expose new interpolation functionalities.