Re: [glas] using (boost)range or STL style interface [was: dense and sparse vectors]
From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2005-08-07 15:33:12
Ian McCulloch wrote:
<snip discussion on iterators versus ranges/cursors>
> I agree - but also it is possible to take iterators way too seriously:
> sure, you need some kind of iterator to actually implement the fundamental
> operations, but for linear algebra, arithmetic operations, dot products
> etc are the level to aim for. For example, an iterator for distributed
> containers that has the same interface as an iterator for a purely local
> container, seems difficult to achieve. The level at which to implement
> distributed containers is probably at operator+, inner_prod, etc.
Good point. Indeed users will basically create containers and views and
use the pre-fabricated algorithms on them. And basically when extending
the existing set of algorithms will one start using stuff like iterators
or cursors (Coming to think of it, how std::copy dispatches to some
kernel depending on the type of the iterators and value_type's is not
defined in the standard either). So the discussion on iterators vs.
cursors can be held in parallel with defining the primary user-interface.