Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-11-23 04:31:28

On Wednesday 22 November 2006 17:07, Nico Galoppo wrote:
> Gunter Winkler wrote:
> > There is no triangular_traits type, but it should be possible to use
> > something like:
> >
> > template< class T, class TRI, class L, class A >
> > void foo(const triangular_matrix<T, TRI, L, A>& m)
> > {
> > return bar(m, TRI());
> > }
> Thanks for the tip. OTOH, I wasn't talking about triangular_matrix in
> particular. Are you implying that one has to revert to writing function
> wrappers as above to infer the correct types? For example, is there a
> mechanism to get the layout_type (row_major/column_major) from a matrix<> ?

Yes, these wrappers are currently the only way to do that. You find examples
of this in operation.hpp.

> Personally, when I want to dispatch to specific specializations, I us the
> tags system (row_major_tag/column_major_tag), but some functions require
> the actual layout_type class to be passed as an argument.

Maybe we should think about the policies which template arguments are public
and which should stay private. I would not mind to make layout_type,
triangular_type public, but they are not defined in the general concepts and
are not available for all matrix types. In order to have a clean
documentation one would have to define a tree of matrix concepts. Are there
any volunteers?