Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2006-12-19 08:45:56


Hallo,

the attached patch provides specializations of row(M, i) and column(M, i) for
generalized_vector_of_vector. This type stores a list of rows/columns which
can be used directly as row/column instead of the proxy. The only difference
is that matrix_row has an index() member function (which is undocumented and
not part of the vector expression concept), and the sub vector type of gvov
usually has no index() member function.

The performance gain is visible but small. However, the patch should help to
avoid unnecessary proxy objects.

mfg
Gunter

PS: similar optimizations are possible for compressed matrix and coordinate
matrix. In general a sub vector of a matrix could be seen as a simple pair of
iterators (it_begin, it_end) contained in a vector expression "facade".