Boost logo

Boost Users :

From: Chung-Lin Wen (jonathan.clwen_at_[hidden])
Date: 2008-03-11 02:25:58


Hi,

It seems the ublas::matrix don't have begin() and end() that the ordinary
STL container would have.
It do have begin1(), begin2(), end1(), end2(), but it only traverse a row or
a column.
So, how could I use the iterators rather than hand-crafted for-loop to
traverse the whole matrix?

e.g.,
copy( matrix.begin(), matrix.end(),
        ostream_iterator<element_type>(cout, " ") ) ; // ERROR: won't
compile: matrix don't have begin & end

(I know matrix have overloaded the operator<<, it's only an example )



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net