Boost logo

Ublas :

From: Michele De Stefano (micdestefano_at_[hidden])
Date: 2007-08-24 08:22:29


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

On 8/24/07, Neal Becker <ndbecker2_at_[hidden]> wrote:
>
> Simple question. How do I iterate over all elements of a matrix?
>
> _______________________________________________
> ublas mailing list
> ublas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/ublas
>