I suppose you are talking of dense matrices (i.e. boost::numeric::ublas::matrix).
If it is so, you can use the "data()" method, that returns a reference to the internal array that holds
matrix elements. This array has a begin() and an end() method, through which you can iterate through
elements.
Sparse matrices have a different internal structure, but also in this case, you can find the internal
array that holds non-zero values (look at the header files, particularly to the public methods).
Best Regards
Michele De Stefano
Simple question. How do I iterate over all elements of a matrix?
_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas