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

[ Thread Index | Date Index | More Archives ]

> I don't do divs as well (reciprocal approximation and Newton-Raphson
> instead, much faster than div),

I confess I didn't know about these concepts!

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

Indeed, it looks optimal for a determinant+inverse computation. Well, both are 
always closely related, but in your approach one gets both faster than with 

We just need to figure out what to do when detP=0...

I have a rough idea: since we may permute rows and cols, it is enough that 
there exist integers i,j,k,l between 0 and 3 such that the following 2x2 
submatrix of M,
( M_{ik} M_{il} )
( K_{jk} M_{jl} )
is invertible.

Such i,j,k,l sure exist whenever M is invertible, so we just need to find 
them. Speed is not even important here since in 98% of cases we'll have 
detP!=0 anyway, so this doesn't impact the "mean complexity" very much.



Attachment: signature.asc
Description: This is a digitally signed message part.

Mail converted by MHonArc 2.6.19+