
Ublas : 
From: Michael Stevens (mail_at_[hidden])
Date: 20051019 13:33:39
On Wednesday, 19. October 2005 18:57, Shawn D. Pautz wrote:
> I think I understand now, thanks. But now that "Matrix" no longer
> appears in the template machinery, should I write
>
> E LU = A;
>
> rather than
>
> Matrix LU = A;
>
> Perhaps an equivalent question: Is E always a concrete matrix class?
E will NOT in general be a concrete Matrix class. In fact it will only be a
concrete matrix class in the case where 'determinant' is called with a
concrete matrix argument. This is because a Matrix class must be dervived
thus
class matrix : public matrix_container<matrix>
and
template <class C>
class matrix_container : public matrix_expression<C>
If you provide matrix_container overload of 'determinant' then E will never be
a concrete Matrix class.
I think this makes practical sense. You can provide an arbitary complex matrix
expression but to be able to do an inversion you need a concrete matrix to
provide working space. The best Matrix type to choose for this will have no
simple relationship with the particular expression. It is up to the user to
choose.
Michael
 ___________________________________ Michael Stevens Systems Engineering 34128 Kassel, Germany Phone/Fax: +49 561 5218038 Navigation Systems, Estimation and Bayesian Filtering http://bayesclasses.sf.net ___________________________________