Merged
Conversation
- Rename type aliases for clarity: VecReal, VecNode, Mat (from Vec1DReal, Vec1DNode, Mat2D) - Add __dot internal function as core dot product implementation - Refactor all matrix operations to use views instead of slices (zero allocations) - Add adjoint×vector product support (v' * w for all type combinations) - All 481 tests pass, zero ambiguities confirmed by Aqua Performance: Matrix×vector and matrix×matrix products now use views, eliminating intermediate allocations in hot loops. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
Move dimension checks from internal __dot to public API boundary: - Add assertions to public dot() methods (user-facing) - Add assertions to adjoint×vector methods (v'*w) - Remove assertions from __dot (trusted internal helper) - Matrix operations keep their existing dimension checks Performance: Eliminates redundant checks in hot loops. Example: 100×100 matrix×vector now does 1 check instead of 101. Design: "Validate at boundaries, trust internally" - public API is defensive while internal helpers are fast. All 481 tests pass. Co-Authored-By: Claude Sonnet 4.5 <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.
close #211