[multi_array] how to use iterators ?

Hello everybody, i'm trying to use boost::multi_array objects with functions of the <algorithm> stl lib. That's why i need to use the iterators of the multi_arrays. But i don't understand the doc about them, and i can't find any example of source code that use them. Could anyone here show me an example of use, or explain me a little bit how they work? Thank you. -- View this message in context: http://www.nabble.com/-multi_array--how-to-use-iterators---tp17556775p175567... Sent from the Boost - Users mailing list archive at Nabble.com.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 r0d wrote:
Hello everybody,
i'm trying to use boost::multi_array objects with functions of the <algorithm> stl lib. That's why i need to use the iterators of the multi_arrays. But i don't understand the doc about them, and i can't find any example of source code that use them.
Could anyone here show me an example of use, or explain me a little bit how they work?
Thank you.
Iterators aren't pretty on multi_array - you have to bear in mind that
each dimension has a subarray. The best place to look for code is the
test cases:
http://www.boost.org/doc/libs/1_35_0/libs/multi_array/doc/test_cases.html
They are somewhat obfuscated by all the typedefs so I've put together a
typedef free testcase for you:
TEST(multi_array_iterator)
{
boost::multi_array
participants (2)
-
r0d
-
Rupert Bruce