[Lemon-user] Edge Iterator for Subgraph created with FilterEdges

Alpar Juttner alpar at cs.elte.hu
Wed May 6 12:52:11 CEST 2015


Hi,

Let me add (announce?) that with the latest dev version of LEMON and
with a C++11 compliant compiler you can also do this:

for(auto e: subgraph.edges())
{
// ...
}

Regards,
Alpár

On Tue, 2015-05-05 at 10:55 +0200, Kovács Péter wrote:
> Hi,
> 
> In your example, the type of "subgraph" is "FilterEdges<SmartGraph>", so 
> you need a corresponding edge iterator:
>    FilterEdges<SmartGraph>::EdgeIt
> instead of
>    SmartGraph::EdgeIt
> 
> I hope it helps.
> 
> Regards,
> Péter Kovács
> 
> 
> 
> 2015.04.30. 12:40 keltezéssel, Simone Busch írta:
> > Hello,
> >
> > I need some help with an edge iterator for a subgraph.
> >
> > I created a subgraph this way:
> >
> >      FilterEdges<SmartGraph> subgraph (graph, filter);
> >
> > and now I tried to iterate over all edges in the subgraph, but this
> > didn't compile:
> >
> >      for (SmartGraph::EdgeIt e(subgraph); e != INVALID; ++e){
> >      //...
> >      }
> >
> > Could anyone please help me?
> >
> > Thank you.
> > Simone Busch
> >
> > _______________________________________________
> > Lemon-user mailing list
> > Lemon-user at lemon.cs.elte.hu
> > http://lemon.cs.elte.hu/mailman/listinfo/lemon-user
> 
> _______________________________________________
> Lemon-user mailing list
> Lemon-user at lemon.cs.elte.hu
> http://lemon.cs.elte.hu/mailman/listinfo/lemon-user




More information about the Lemon-user mailing list