Add least_squares, reset_knots, keep_knots across all fitter types#42
Merged
Add least_squares, reset_knots, keep_knots across all fitter types#42
Conversation
b7f54a1 to
1615655
Compare
- Add least_squares(smoothing, reset_knots) to all 9 fitter types (was missing from fitpack_parametric_curve). When reset_knots=.true., a smoothing pre-fit determines sparser knots before the LS pass. - Add interpolate(reset_knots) to all 9 types (default .true.). When .false., FITPACK continues from current knots. - Add keep_knots parameter to fit() to bypass the iopt guard. - Extend test_umbrella_api with parametric curve interpolate/LS tests. - Mark PR A (Public API Cleanup) as done in refactoring plan.
1615655 to
7565bb3
Compare
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
least_squarestofitpack_parametric_curve(inherited byfitpack_closed_curveandfitpack_constrained_curve), completing consistent API across all 9 fitter typesreset_knotsoptional parameter tointerpolateon all 9 types — when.false., preserves the current knot set as a starting point instead of recomputing from scratchkeep_knotsoptional parameter tofiton all 9 types — bypasses theioptguard so callers (likeinterpolate(reset_knots=.false.)) can continue from the current knot configurationtest_umbrella_apiwith parametric curveinterpolate/least_squarescoverage andfpvalue checks (fp=0for interpolation,fp>0for least-squares)Test plan
fpm buildcompiles cleanlyfpm test— all 51 tests pass, 0 failuresinterpolate(reset_knots=.false.)achievesfp=0least_squares()after smoothing fit givesfp>0