Fast matrix inversion without a package

Assume that I have a square matrix M . Assume that I would like to invert the matrix M .

I am trying to use the the fractions mpq class within gmpy2 as members of my matrix M . If you are not familiar with these fractions, they are functionally similar to python's built-in package fractions . The only problem is, there are no packages that will invert my matrix unless I take them out of fraction form. I require the numbers and the answers in fraction form. So I will have to write my own function to invert M .

There are known algorithms that I could program, such as gaussian elimination. However, performance is an issue, so my question is as follows:

Is there a computationally fast algorithm that I could use to calculate the inverse of a matrix M ?


Is there anything else you know about these matrices? For example, for symmetric positive definite matrices, Cholesky decomposition allows you to invert faster than the standard Gauss-Jordan method you mentioned.

For general matrix inversions, the Strassen algorithm will give you a faster result than Gauss-Jordan but slower than Cholesky.

It seems like you want exact results, but if you're fine with approximate inversions, then there are algorithms which approximate the inverse much faster than the previously mentioned algorithms.

However, you might want to ask yourself if you need the entire matrix inverse for your specific application. Depending on what you are doing it might be faster to use another matrix property. In my experience computing the matrix inverse is an unnecessary step.

I hope that helps!

链接地址: http://www.djcxy.com/p/96408.html

上一篇: 在UWP项目中使用Akavache + Mobile Center时出现错误

下一篇: 没有包装的快速矩阵反演