Re: [eigen] request for help: 4x4 matrix inverse |

[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]

On Tuesday 15 April 2008, Benoît Jacob wrote:
> I don't agree with the last sentence: it is easy to find examples
> where detP=0 and detM is nonzero. For example,
>
> M=
> (1 1 0 0)
> (1 1 1 0)
> (0 1 1 0)
> (0 0 0 1)
>
> this matrix M is invertible, but its topleft 2x2 block is not. I
> think that your formula works when P is invertible, but doesn't
> allow to conclude anything when P is not.
Hm, strange there was nothing mentioned in the book about this
(Numerical Recipes in C, 2nd ed, page 77). I'll read a bit more about
that and I'll get back.
> But that's not a problem for me since what I really need is the 4x4
> inversion and for this I think that your method will work great --
> implementing it right now. For 4x4 determinant, I think that the
> method I have in LU/Determinant.h is even faster since it does only
> 30 muls and zero divs -- and so in particular, zero conditional
> branching.
I don't do divs as well (reciprocal approximation and Newton-Raphson
instead, much faster than div), no branching, but i haven't
benchmarked it yet. The nice thing about this method is that
calculating the determinant is more than half-way to getting the
inverse, as most quantities are already calculated.