Open tBuLi opened 4 years ago
I assume this is for degenerate basis vectors, when sometimes there is no inverse?
Yes that's one case, and another one I've found is when performing bivector splits: when the two bivectors in the split B = B_1 + B_2 start to become to similar. As they become more and more identical the real inverse gives a LinAlgError at some point, but the pseudoinverse returns B_1 = B_2 = B / 2. This is much friendlier ;).
*I should say that this is what I hope and strongly suspect it will return, because I replaced the inverse with a pseudoinverse in the algorithm as it was stated in geometric calculus and got this much nicer result.
If you update to the development version of clifford
, you should find that the linear algebra method is not used at all (edit: in small algebras).
I think we still use it for algebras greater than dimension 6?
I've taken the liberty of making a PR for this with a slightly different API then suggested above: I added a .pinv()
method to really make it easy to distinguish. Let me know if you like it or want to see some changes!
Would it be possible to add an option to use the matrix pseudoinverse instead of the normal matrix inverse into the method for computing inverses for multivectors? Having read the relevant chapter in Christian Perwass' book, he also mentions there that a pseudoinverse should work. I think it would be very nice to add an option to e.g. the
.inv()
method that allows something likegiven that in some situations this is still meaningful to do.