[Dune-devel] Random-Access Iterators

Christian Engwer christian.engwer at uni-muenster.de
Wed Oct 1 23:53:49 CEST 2014


On Wed, Oct 01, 2014 at 05:24:29PM +0200, Oliver Sander wrote:
> Am 01.10.2014 um 17:18 schrieb Jö Fahlke:
> > Am Wed,  1. Oct 2014, 16:22:48 +0200 schrieb Oliver Sander:
> >> I would really expect property b):
> >>
> >>> (b) you could also want to write
> >>>     gridView.begin() + gridView.indexSet().index( entity )
> >>>     to obtain an iterator to "entity"
> >>
> >> I think people will assume this implicitly, and get confused if it doesn't hold.
> >> On the other hand it cannot hold with mixed-element grids.  This for me is another
> >> point against random-access iterators.
> > 
> > Actually, poeple have been confused about this in the _past_ already.  That
> > is, we have had poeple expecting that iteration order == index order, and had
> > to correct them.  That is nothing new about random access iterators.
> > 
> 
> That is correct.  But so far the iteration order never appeared explicitly.
> This changes with the random-access iterator.

But only for those grids with random access and I think in this case
we should require (as a matter of beauty) (b) as well.

Christian




More information about the Dune-devel mailing list