[Lemon-devel] Design decision for graph concept: firstInc/nextInc vs. IncEdgeIt
Matthias Walter
xammy at xammy.info
Mon Oct 28 12:32:25 CET 2013
Dear LEMON developers,
I recently tried to create a graph adaptor class but had the following
problem: When iterating over the edges incident to a node, I am not able
to find the next edge *only* based on the previous edge (and its
direction flag), hence I am unable to implement the nextInc() method
properly. On the other hand an IncEdgeIt iterator is easy to implement
since the latter might store additional information which helps to find
the next edge quickly. But now I saw that in order to use this adapted
graph for another adaptor (like FilterNodes) I need the firstInc/nextInc
methods to be implemented although these are not explicitly listed in
the Graph concept documentation.
Is it a particular design decision that e.g. SubGraphBase uses the
firstInc/nextInc interface instead of iterators?
Or is nextInc() typically more efficient than having a comparable iterator?
Best regards,
Matthias Walter
More information about the Lemon-devel
mailing list