[Matrix iterators] Beginner problem
19 Jul
2007
19 Jul
'07
2:54 p.m.
Hello everyone, I don't understand how to use iterators with matrices; how can I scan all the elements of a matrix? The only thing I have managed to do until now is to read/write the elements of the first row or the first column: ublas::matrix<int> M(3,3); int i = 0; for( ublas::matrix<int>::iterator1 Mit1 = M.begin1(); Mit1 != M.end1(); Mit1++ ) { *Mit1 = i; i++; } Are there such things as row iterators, column iterators, or iterators ocver all the elements of the matrix? Thanks Régis B.
6341
Age (days ago)
6341
Last active (days ago)
0 comments
1 participants
participants (1)
-
Regis Behmo