-
Notifications
You must be signed in to change notification settings - Fork 32
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
Linear system solver for GF2 #541
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #541 +/- ##
==========================================
- Coverage 96.44% 96.07% -0.38%
==========================================
Files 46 46
Lines 5911 5962 +51
==========================================
+ Hits 5701 5728 +27
- Misses 210 234 +24 ☔ View full report in Codecov by Sentry. |
Thanks for the pull request.
Are you trying to solve a over-determined system? Are there "bit errors" involved? Or are all equations consistent?
I don't like overloading |
Yes. I am decoding code words back into informational messages (I don't know proper terms in English, sorry). I changed solve to lstsq for overloading, but saved I also want to add Galois rings (issue #280) to the library in another pr. I have already implemented it in Julia (SimplePolynomialRing.jl). |
Which algorithm is implemented here? It's likely the algorithm should work in other fields. If so, I'd like to implement it so it can work in any field.
Cool. But please work with me before starting work. There is significant architecture implications. |
To be honest, I don't know the name of the algorithm (I contacted the author of that library and it's name were not mentioned). It seems that the algorithm is optimized for GF2.
I figured it out, and definitely liked it. How can I contact you to get instructions? |
this feels like quite a lot of ceremony, for what is essentially just: puzzle = np.c_[A, b]
reduced = puzzle.row_reduce()
solution = reduced[:, -1] |
I needed a solver for linear systems over GF2 for simple codes decoding, but the library only has a solver that just inverts the coefficient matrix A requiring matrix A be square. I found this solution in Julia and translated it. The solve function can be invoked using
np.linalg.solve
(i.e.galois.GF2._solve
) and usinggalois.GF2._solve
. As I modified the old function calling style I would say that it works (build succeeded), and it works well in may project.