From: jhrwalter (walter_at_[hidden])
Date: 2002-02-12 03:44:46
--- In boost_at_y..., Peter Schmitteckert (boost) <boost_at_s...> wrote:
> Dear all,
> wouldn't it be nice to have an iterator for matrices,
> which iterates over all elements in the fastest way
I'm not sure ;-)
> In my Application I have to update all elements of a
> matrix, so I'd like to write
> numerics::matrix<...> m;
> // ....
> for( matrix::iterator it = m.b.begin(); it != m.end(); ++it )
> *it = MySpecialFormula( *it );
If we grant access to the internal representation, one could write
for( matrix<...>::array_type::iterator it = m.data().begin(); it !=
m.data().end(); ++it )
*it = MySpecialFormula( *it );
> I was only able to find iterator1 / iterator2 in ublas::matrix.
> Best wishes,
P.S.: Sorry for the delay.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk