Boost logo

Ublas :

From: Vento Neicapelli (lascoscazzato_at_[hidden])
Date: 2005-01-19 20:39:12


Hi Michael

Thanks for your answer. I tried iterator1 and iterator2 on a sparse
matrix...but they are good to get rows and column....(with 0). How to get
only the non-zeros? If you have some examples, please attach them.

Vento

>On Wednesday 19 January 2005 18:54, Vento Neicapelli wrote:

>>I start evaluating uBlas lib. Who know how to get the nonzero elements of
>>a
>>sparse_matrix (or compressed_matrix)? Is there an iterator?

>Yes iterators are the way to do this. For all sparse types they only
>traverse the structurally non-zero elements. 'Structurally' means that the
>actual value of these elements may be zero due to a previous calculation.

>Do you need an example of using matrix iterators?

>Michael

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/