-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Implementation of LU Decomposition #26
Draft
rabbull
wants to merge
16
commits into
benruijl:main
Choose a base branch
from
rabbull:lu-decomposition
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+3,649
−1,561
Conversation
This file contains 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
|
rabbull
force-pushed
the
lu-decomposition
branch
from
December 6, 2024 09:57
ed38545
to
153aea7
Compare
- Add conversion from conditions to pattern restrictions - Add contains condition
- Add if_then and if_changed - Add break_chain - Add condition functions for transformers
- Do not set a static trace level - Allow transformers on rhs of contains - Add is_type condition on transformers
- Use absolute error so that zeros are supported - Add i() function for floats - Add automatic evaluation of complex i - Move EXP, E, etc from State to Atom
- Add test to see if expression is a polynomial - Add custom normalization for atom fields - Collect numbers from divisions
- Add matrix augmentation function - Expose Gaussian elimination methods - Improved AsAtomView trait
- Remove the need for many into() calls - Add owned Replacement and BorrowedReplacement - Remove methods on Pattern
- ReplaceIterator and PatternAtomTreeIterator now implement Iterator - Unify call signatures
- Make the FunctionMap owned - Implement Borrow<[u8]> on Atom so that atoms that are keys in maps can be retrieved by an AtomView's get_data
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.
This PR implements LU decomposition by enhancing
gaussian_elimination
to support step-by-step recording of row operations. These recorded steps can then be replayed on an identity matrix to construct theL
matrix.Four new methods are introduced:
gaussian_elimination_ex
: An extended version of Gaussian elimination that includes an option to record the steps performed during row operations. The existinggaussian_elimination
method now serves as a wrapper for this function.lu_decomposition
: Computes the LU decomposition of a matrix. This method returns the lower triangular matrixL
, the upper triangular matrixU
, and a permutation vectorpv
(if row permutations occur during Gaussian elimination).lu_decomposition_in_place
: A more memory-efficient variant oflu_decomposition
. Instead of returningU
, it modifies the original matrix (self
) in place to representU
.permute_rows
: A utility function that applies a permutation vectorpv
to a matrix, enabling consistent handling of row permutations.