Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2008-06-18 15:50:42


Am Dienstag, 17. Juni 2008 19:45 schrieb Shawn D. Pautz:
> There appears to be a discrepancy between the documented requirements
> for the Vector concept
> (http://www.boost.org/doc/libs/1_35_0/libs/numeric/ublas/doc/containe
>r_concept.htm#vector) and the ones enforced by the concept-checking
> classes
> (boost/numeric/ublas/detail/concepts.hpp). The concept-checking
> classes such as VectorConcept require any vector to supply a
> find_element member function. However, the online documentation for
> that concept (and Vector Expression) does not mention that member
> function.

The find_element method was introduced to support iterator access. It is
mostly used by the sparse and packed versions of algorithms.

> Do valid vector types need to supply find_element or not?

In order to use _all_ of ublas functionality you need the find_element()
method. However, many common routines should work without it. You need
to define the storage_type to "dense_tag". Then the algorithm will
prefer access by using operator ()(i,j) and operator [](i).

mfg
Gunter