Boost logo

Ublas :

Subject: [ublas] Sparse vector
From: John Reid (j.reid_at_[hidden])
Date: 2009-06-05 12:52:02


Forgive me if I should have been able to work this out from the
documentation. I didn't manage that.

Can you recommend which of mapped, compressed or coordinate vector I
should use for the following?

I need a sparse vector over N elements. I will assign values to a subset
of these elements in an unpredictable order then I need to iterate
through the non-zero elements (and their indices) in order.

Thanks,
John.