Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
9f21614 to
57a168c
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
ChebyshevTT.DomainandChebyshevTT.NNodesinstead of exposing private invariant arrays.Refs #73.
Why This Is A Small Slice
Issue #73 is broader than TT. This PR intentionally hardens only the low-risk TT surface because
ChebyshevTTalready stores domain and node counts in private backing fields, so snapshot getters do not rewrite hot internal code paths.Approximation, Spline, and Slider still expose mutable arrays through public auto-properties. They should be handled in follow-up work with a backing-field/snapshot design; a one-line clone-on-get change there would add hidden allocations throughout internal evaluation/build paths.
Verification
TtPublicStateOwnershipTestsfailed3/3because public arrays were live.dotnet test tests/ChebyshevSharp.Tests/ChebyshevSharp.Tests.csproj --configuration Release --no-restore --filter FullyQualifiedName~TtPublicStateOwnershipTests --verbosity minimal-> 3/3 passed.dotnet test --configuration Release --no-restore --verbosity minimal-> 1505/1505 passed.dotnet format --verify-no-changes --verbosity minimal-> passed.dotnet restore,dotnet build --configuration Release --no-restore --verbosity minimalpassed with 0 warnings/errors.dotnet pack src/ChebyshevSharp --configuration Release --no-build --output /tmp/chebsharp-cycle12-tt-pack-> createdChebyshevSharp.0.12.0.nupkg.git diff --check-> passed.