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

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


On Wed, Feb 25, 2009 at 11:30 AM, Andrea Arteaga <yo.eres@xxxxxxxxx> wrote:
>
>
> 2009/2/25 Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
>>
>> I don't think we want to provide multiple algorithms for the
>> same matrix sizes.
>
>
> That were useful to provide a performance comparation between Givens and
> Gram-Schmidt in simply way, but for all other 'normal' jobs that is actually
> useless.

yes, exactly

> In this case we can simply write specialized QR class, such as
> template<typename _Scalar>
> class QR<Matrix<_Scalar, 2, 2>;

I proposed something more complicated because I think the same
specialization could work for a range of sizes (with a few
compile-time if())

> I didn't completely understand what matrix m_qr and Vector m_hCoeffs are and
> how does QR compute the Q and the R from m_qr. But if m_qr is a matrix with
> Householder vectors, she's not compatible with a specialized QR for others
> algorithms, isn't it?
> So if we want to specialize some QR class, we must to reimplement
> _compute(), matrixQ() and matrixR(). Perhaps for small matrices, it makes
> sense to compute and store directly Q and R at construction-time, with
> _compute(), without m_q and m_hCoeffs. Or, if we find some method to
> directly say at construction-time which matrices must be computed, we no
> longer need m_qr, like gael said.
> Before code something, I want to actualy understand all aspects of this QR
> class.

I think that what really matters is that all matrixQ and matrixR
functions returns the same thing. So if for fixed sizes they return
const reference to plain matrices, then we should do the same for the
general case (using either lazy evaluation in matrixQ() or bit flags
at the computation time)

> Last note: don't forget the 2x3 and 3x2 matrices. QR is very useful for
> non-quadratic matrices.
> I'll be offline until saturday.
> Andrea



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