Aug improvement#1745
Merged
Merged
Conversation
Improvements to `aug` following suggestions from Marc Peterfi. The function behaves as it previously did when given a single matrix (that is, it will insert a vertical bar before the final column), but when given two or more matrices as arguments it will concatenate them with vertical bars between each. The original use case is to generate worked solutions for matrix inversion or similar, e.g. aug(A, ident(3)) → aug(rowop(A,2,1,A[2,1]/A[1,1]), rowop(ident(3),2,1,A[2,1]/A[1,1]) but could be used for more. aug(addcol(A,b)) and aug(A,b) are identical. Existing test cases will fail only because the vertical bar is now generated as a closing bracket instead of an opening one. This looks nicer, so I am treating this as a feature instead of a bug.
Adding and updating test cases for new aug functionality
Updated docs to reflect expanded aug functionality
Member
|
Thanks @LukeLongworth the |
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.
Improvements to
augfollowing suggestions from Marc Peterfi. The function behaves as it previously did when given a single matrix (that is, it will insert a vertical bar before the final column), but when given two or more matrices as arguments it will concatenate them with vertical bars between each.The original use case is to generate worked solutions for matrix inversion or similar, e.g. aug(A, ident(3)) → aug(rowop(A,2,1,A[2,1]/A[1,1]), rowop(ident(3),2,1,A[2,1]/A[1,1]) but could be used for more.
aug(addcol(A,b)) and aug(A,b) are identical.
Existing test cases will fail only because the vertical bar is now generated as a closing bracket instead of an opening one. This looks nicer, so I am treating this as a feature instead of a bug.
My apologies for two separate pull requests in quick succession!