Boost logo

Ublas :

From: Sebastian Gesemann (s.gesemann_at_[hidden])
Date: 2007-12-10 10:23:41

On Dec 10, 2007 4:07 PM, Neal Becker <ndbecker2_at_[hidden]> wrote:

> So, we actually _want_ iterators of a zero vector to skip over the zeros?
> I
> guess I really don't understand this.

The thing is that a zero vector doesn't actually store the zeros. So,
there's nothing to iterate over. Same thing with sparse vectors and
matrices. Skipping (unstored) zeros is a good thing during calculations (i.e.
a dot product) to speed things up, I guess.