[Dune] Method level() of class IntersectionIterator

Oliver Sander sander at mi.fu-berlin.de
Tue Oct 17 15:09:22 CEST 2006


Dear Dune!
For historical reasons the class IntersectionIterator has a method
level().  This dates back to the time when intersections connected
entities of the same level.  Since this has changed recently it
doesn't make much sense anymore to speak of the level of an
intersection (unless of course you _define_ it to be the level of
the inside entity).  Therefore I propose to remove the method
level().

Calls to this method can be replaced by calls to inside()->level(),
making transition simple.  I suppose that there will be the objection
that this may lead to a decrease in efficiency.  My opinion is that,
yes, theoretically it may, but a) since an intersection (as a
concept, not the actual class) doesn't have a level, the method
level() is rarely used b) on many implementations it does not
lead to a loss of speed c) you must have created the intersection
someplace, therefore you have created the inside element at some
point.  If you really want as much efficiency as humanly possible
you can cache the level there.

If there are no objections I will mark the method as deprecated
by tomorrow morning and remove it next week friday, the 27.

--
Oliver

************************************************************************
* Oliver Sander                ** email: sander at mi.fu-berlin.de        *
* Freie Universität Berlin     ** phone: + 49 (30) 838 75217           *
* Institut für Mathematik II   ** URL  : page.mi.fu-berlin.de/~sander  *
* Arnimallee 6                 ** -------------------------------------*
* 14195 Berlin, Germany        ** Member of MATHEON (www.matheon.de)   *
************************************************************************


More information about the Dune mailing list