|
Ublas : |
From: Nico Galoppo (nico_at_[hidden])
Date: 2006-11-22 11:07:41
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<> ?
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.
--nico
-- nico galoppo von borries | address: 119 fidelity st., carrboro comp. graphics phd. student | north carolina, 27510 USA UNC, chapel hill | phone: +1 (919) 962-1898 (office) | +1 (919) 942-4388 (home) | email: nico at cs dot unc dot edu | homepage: http://www.ngaloppo.org