-
-
Notifications
You must be signed in to change notification settings - Fork 692
Add LinBox algorithm for right kernel of sparse matrix over the rationals #40650
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
Add LinBox algorithm for right kernel of sparse matrix over the rationals #40650
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
99cc850 to
f160365
Compare
|
Documentation preview for this PR (built with commit b67fb38; changes) is ready! 🎉 |
f160365 to
cd592ed
Compare
|
otherwise looks good to me, but do add some doctest for the top-level method is the new algorithm asymptotically faster (for very sparse matrix)? If so it may be beneficial to add a test that can be handled quickly with the change, but cannot be handled in reasonable time without it. |
cd592ed to
0a9d26a
Compare
|
@rburing please avoid rebases / force pushes if possible. That messes with review history and makes reviews more cumbersome. |
I'll keep it in mind for next time. I didn't change the base commit, so you can just press the Compare link to see the changes since the previous push. |
|
bug: run it, then ctrl-C, you'll see it's spending time in flint or iml. When the original matrix is dense, the algorithm= parameter is silently thrown away. even when it's sparse, sometimes it spend time in I'm also struggling to find a combination of parameters that makes linbox faster than the other algorithms. (although if the goal is to provide an interface, this is not mandatory.) |
|
I improved the error handling. The reason you see it spending time on echelonization with other algorithms is because of the The example I used is a 38875 x 13867 matrix ec9.txt (in SMS format) that you can load: Trying the |
|
looks hard to make this into a doctest (unless someone can figure out how to concisely construct a matrix with similar property), but otherwise should be fine. |
sagemathgh-40650: Add LinBox algorithm for right kernel of sparse matrix over the rationals This uses less memory than the only alternative which is a dense option, so it can handle some bigger matrices. The code is based on analogous existing/surrounding Sage code and LinBox's example [`nullspacebasis_rat.C`](https://github.com/linbox-team /linbox/blob/d93e497b6233175addf34891ca8f7a37aa4b2f41/examples/nullspace basis_rat.C). I'm not yet fluent in Cythonese so comments are welcome. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. URL: sagemath#40650 Reported by: Ricardo Buring Reviewer(s): Ricardo Buring, Sahil Jain, user202729
This uses less memory than the only alternative which is a dense option, so it can handle some bigger matrices.
The code is based on analogous existing/surrounding Sage code and LinBox's example
nullspacebasis_rat.C.I'm not yet fluent in Cythonese so comments are welcome.
📝 Checklist