lemon/graph_adaptor.h
changeset 1964 df0b07457083
parent 1956 a055123339d5
child 1979 c2992fd74dad
equal deleted inserted replaced
22:2d2402880ed4 23:2670105b7d0e
   458   /// the node-iterator cares only the filter on the node-set, and the 
   458   /// the node-iterator cares only the filter on the node-set, and the 
   459   /// edge-iterator cares only the filter on the edge-set.
   459   /// edge-iterator cares only the filter on the edge-set.
   460   /// This way the edge-map
   460   /// This way the edge-map
   461   /// should filter all edges which's source or target is filtered by the 
   461   /// should filter all edges which's source or target is filtered by the 
   462   /// node-filter.
   462   /// node-filter.
   463   /// \code
   463   ///\code
   464   /// typedef ListGraph Graph;
   464   /// typedef ListGraph Graph;
   465   /// Graph g;
   465   /// Graph g;
   466   /// typedef Graph::Node Node;
   466   /// typedef Graph::Node Node;
   467   /// typedef Graph::Edge Edge;
   467   /// typedef Graph::Edge Edge;
   468   /// Node u=g.addNode(); //node of id 0
   468   /// Node u=g.addNode(); //node of id 0
   476   /// typedef SubGraphAdaptor<Graph, Graph::NodeMap<bool>, Graph::EdgeMap<bool> > SubGW;
   476   /// typedef SubGraphAdaptor<Graph, Graph::NodeMap<bool>, Graph::EdgeMap<bool> > SubGW;
   477   /// SubGW gw(g, nm, em);
   477   /// SubGW gw(g, nm, em);
   478   /// for (SubGW::NodeIt n(gw); n!=INVALID; ++n) std::cout << g.id(n) << std::endl;
   478   /// for (SubGW::NodeIt n(gw); n!=INVALID; ++n) std::cout << g.id(n) << std::endl;
   479   /// std::cout << ":-)" << std::endl;
   479   /// std::cout << ":-)" << std::endl;
   480   /// for (SubGW::EdgeIt e(gw); e!=INVALID; ++e) std::cout << g.id(e) << std::endl;
   480   /// for (SubGW::EdgeIt e(gw); e!=INVALID; ++e) std::cout << g.id(e) << std::endl;
   481   /// \endcode
   481   ///\endcode
   482   /// The output of the above code is the following.
   482   /// The output of the above code is the following.
   483   /// \code
   483   ///\code
   484   /// 1
   484   /// 1
   485   /// :-)
   485   /// :-)
   486   /// 1
   486   /// 1
   487   /// \endcode
   487   ///\endcode
   488   /// Note that \c n is of type \c SubGW::NodeIt, but it can be converted to
   488   /// Note that \c n is of type \c SubGW::NodeIt, but it can be converted to
   489   /// \c Graph::Node that is why \c g.id(n) can be applied.
   489   /// \c Graph::Node that is why \c g.id(n) can be applied.
   490   /// 
   490   /// 
   491   /// For other examples see also the documentation of NodeSubGraphAdaptor and 
   491   /// For other examples see also the documentation of NodeSubGraphAdaptor and 
   492   /// EdgeSubGraphAdaptor.
   492   /// EdgeSubGraphAdaptor.