Refactor all 10 linear algebra implementations#1276
Merged
Conversation
Apply SKILL.md conventions across the entire linearalgebra package: fix package/header ordering, add detailed file-level docs with algorithm explanations and use cases, replace FQN with proper imports, make fields/helpers private, add Javadoc on public methods, fix Big-O notation to use explicit multiplication, move main methods to bottom, and add educational inline comments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
6683a9c to
f6ac676
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
f6ac676 to
a9a04a7
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
linearalgebrapackage applying SKILL.md conventionsjava.util.Arrayswith proper importsO(n^3*log(p)),O(m^3*log(n)),O(k*n^2)privatewhere appropriate@param,@return, and time complexityFiles modified
FreivaldsAlgorithm.java— probabilistic matrix verificationGaussianElimination.java— linear system solverLinearRecurrenceSolver.java— recurrence via matrix exponentiationMatrixDeterminantLaplaceExpansion.java— cofactor expansionMatrixInverse.java— inverse via Gaussian eliminationMatrixMultiplication.java— standard O(n^3) multiplicationMatrixPower.java— binary matrix exponentiationModularLinearAlgebra.java— linear algebra in finite fieldsRotateSquareMatrixInplace.java— 90° clockwise rotationSimplex.java— linear programmingTest plan
bazel build ...linearalgebra:linearalgebra)🤖 Generated with Claude Code