Re: [eigen] Fast QR for 2x2, 3x3

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


2009/2/23 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
All I can say for sure is that Givens rotations don't
require computing cosines and sines!

Right. Sorry for lapsus. (I was thinking about inverse problem).

Perhaps for 4x4 or more Gram-Schmidt is faster than Givens, but for 2x2 and 3x3 I think that Givens are the best way. The only way to test it is to implement both algorithms and compare the results.

In 2x2 case there is nothing to do (I use the Matlab syntax):

A = [a, b; c, d]    =>    r = ||A||    ,    Q = [a/r, -b/r; b/r, a/r]     ,    R = Q' * A

We can use this direct approach.

In 3x3 case we need 3 Givens rotations and 3 matrix products and that can be expensive, but we can write directly the product's result or use lazy evaluation.

At this moment I have some troubles with my Gentoo, but I hope I can write something.

Thanks for the link to Golub & van Loan.

Another question: Which product algorithm is used in Eigen?


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/