Boost logo

Ublas :

From: Niko Vuokko (niko.vuokko_at_[hidden])
Date: 2008-07-18 16:52:00


How do I iterate over the strict upper triangle of a
compressed_matrix? I came up with some in the lines of (abbr.)

for(iterator1 i1 = mat.begin1(); i1 != mat.end1(); ++i1) {
    s = i1.index1();
    for(iterator2 i2(mat, 1, s, s+1, ???); i2 != i1.end(); ++i2)
       ...
    }
}

but don't know how to fill in that last parameter. Is this sensible or
is there a better way to do this? Performance is essential so I don't
want to use find functions if there's another way.

niko