Boost logo

Ublas :

Subject: [ublas] template parameters of ublas Types while extending ublas
From: Michael Norel (minorlogic_at_[hidden])
Date: 2009-07-27 05:02:11


Hi Everyone!

Currently I am working under Cholesky implementation.
I saw Gunter Winkler Cholesky implementation at http://www.guwi17.de/ublas/examples/ (1).
Also I reviewed boost/numeric/ublas/lu.hpp (2) and
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Effective_UBLAS/Matrix_Inversion (3).

Most of functions in (1), (2) declared as follows :

template < class INMatrix, class OUTMatrix>
void someFunc(const MATRIX& A, TRIA& L);//(A)

Some functions in (3) follows declaration :

template<class E1, class E2>
void someFunc(matrix_expression<E1> &e1, matrix_expression<E2> &e2);//(B)

and

template<class T>
void someFunc(matrix<T> &m); //(C)

So, what is better varint ?
Are there some important concepts of ublas?

In my opinion second variant (B) is better than (A) and (C), because it
provides type checking.

Thanks!