-
Notifications
You must be signed in to change notification settings - Fork 23
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
[request] Matrix Inverse #15
Comments
Matrix multiplation would be cool too. |
Matrix multiplication is already implemented as Edit Matrix |
The consensus in the numerics community is to not compute inverse matrices directly, as this is . If the matrix is dense (i.e. mostly nonzero), one could implement a LU factorization once and solve the two associated linear systems in linear time, otherwise there's a wide choice of iterative methods. In both cases, the solution to the linear system might not exist (if for example the matrix has numerically parallel columns or rows, i.e. it's "rank-deficient"). What sort of problems are you looking at @fosskers ? |
I should also mention that |
I think matrix inverse can sometimes be useful for didactic purposes, but it would be amazing to have practical linear solvers in pure Haskell. Is there any way we can feasibly abstract over matrix types for these kinds of algorithms? I'm not sure what it would look like exactly (maybe a standard set of operations in (Maybe that's too-ambitious a goal without some concrete implementations first...?) |
@lancelet I don't think it would be a good goal to have a general abstract interface that would work for all array libraries in Haskell. Certainly not a backpack thing :) All of the functionality is already available for adding matrix inverse, it's just a matter of implementing it. Unfortunately, there is no support for sparse matrices yet, but I do have plans on adding it. Created #50 so not to forget and discuss a possible implementation. Currently I am busy with translating hip to use |
massiv
hastranspose
already - it would be handy for mathematical libraries/applications to haveinverse
as well.The text was updated successfully, but these errors were encountered: