[Dune-devel] Random-Access Iterators

Jö Fahlke jorrit at jorrit.de
Wed Oct 1 15:54:40 CEST 2014


Am Wed,  1. Oct 2014, 14:30:42 +0200 schrieb Christian Engwer:
> > One question:
> > is it supposed to be guaranteed by the proposal that if an element K has
> > index k then
> > it[k] would give me that element? There might be some use case for
> > easily going from index to element although
> > I haven't really come up with an example. But I guess that wouldn't
> > really be guaranteed anyway because that would
> > mean that one always iterates over the grid in the order of incrementing
> > index.
> 
> I think this would be a reasonable requirement. We don't require this
> for arbitrary meshes, but for meshes with random access I think it
> would be very useful to have this property. It would also imply that
> we iterate in the order of indices and it would result in better
> locality of our algorithms.

Uh, the idea sounds attractive, but what about mixed meshes?  I mean we can
give the guarantee that the indices within one geometry type will only
increase in iteration order, but that would make the indices pretty much
unrelated to the distance between two iterators.  Or do we want to preclude
mixed meshes from ever having random access iterators?

On the other hand, this sounds like something that is useful to have even when
the iterators are not random-access.  So for me this is something seperate
from random-access, and I would like to keep it that way.

Regards,
Jö.

-- 
Jorrit (Jö) Fahlke, Institute for Computational und Applied Mathematics,
University of Münster, Orleans-Ring 10, D-48149 Münster
Tel: +49 251 83 35146 Fax: +49 251 83 32729

[Zum Thema GNOME 3]
(15:11:22) marina: linus ist auf meiner seite
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20141001/2e9d15f1/attachment.sig>


More information about the Dune-devel mailing list