Pregunta

I'm working on a Kalman filter implementation in Go. After reading this thread, I decided to use biogo for matrix operations. However, it appears from the documentation that biogo doesn't provide a function to calculate the inverse of a matrix.

Does anyone know otherwise or know of an easy way to calculate the inverse using the functions that biogo does provide? Thanks!

¿Fue útil?

Solución

If you're willing to switch to the github.com/gonum/matrix package, then it provides an Inverse function that you can use. The interfaces of the two packages appear similar.

From posts on the gonum-dev mailing list, it appears that gonum/matrix is the way forward (and will eventually replace biogo.matrix).

Otros consejos

You should check if you really need the inverse matrix or if everything you do with it is solving some linear system.

For instance, if your formula is x=AB^(-1)Cy, then you decompose it into the steps w=Cy, z=solve(B,w), x=Az, completely avoiding the inverse matrix. So if your application is vector in - vector out, chances are that the inverse is not needed.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top