문제

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!

도움이 되었습니까?

해결책

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).

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top