lemon/graph_adaptor.h
changeset 1948 9e9c035a08be
parent 1909 2d806130e700
child 1949 5db4ff8d69de
equal deleted inserted replaced
17:c90656dd783e 18:d1ddabe37e0f
   186   ///parts of the lib. Use them at you own risk.
   186   ///parts of the lib. Use them at you own risk.
   187   ///
   187   ///
   188   /// Let \f$G=(V, A)\f$ be a directed graph and 
   188   /// Let \f$G=(V, A)\f$ be a directed graph and 
   189   /// suppose that a graph instange \c g of type 
   189   /// suppose that a graph instange \c g of type 
   190   /// \c ListGraph implements \f$G\f$.
   190   /// \c ListGraph implements \f$G\f$.
   191   /// \code
   191   ///\code
   192   /// ListGraph g;
   192   /// ListGraph g;
   193   /// \endcode
   193   ///\endcode
   194   /// For each directed edge 
   194   /// For each directed edge 
   195   /// \f$e\in A\f$, let \f$\bar e\f$ denote the edge obtained by 
   195   /// \f$e\in A\f$, let \f$\bar e\f$ denote the edge obtained by 
   196   /// reversing its orientation. 
   196   /// reversing its orientation. 
   197   /// Then RevGraphAdaptor implements the graph structure with node-set 
   197   /// Then RevGraphAdaptor implements the graph structure with node-set 
   198   /// \f$V\f$ and edge-set 
   198   /// \f$V\f$ and edge-set 
   199   /// \f$\{\bar e : e\in A \}\f$, i.e. the graph obtained from \f$G\f$ be 
   199   /// \f$\{\bar e : e\in A \}\f$, i.e. the graph obtained from \f$G\f$ be 
   200   /// reversing the orientation of its edges. The following code shows how 
   200   /// reversing the orientation of its edges. The following code shows how 
   201   /// such an instance can be constructed.
   201   /// such an instance can be constructed.
   202   /// \code
   202   ///\code
   203   /// RevGraphAdaptor<ListGraph> gw(g);
   203   /// RevGraphAdaptor<ListGraph> gw(g);
   204   /// \endcode
   204   ///\endcode
   205   ///\author Marton Makai
   205   ///\author Marton Makai
       
   206 
   206   template<typename _Graph>
   207   template<typename _Graph>
   207   class RevGraphAdaptor : 
   208   class RevGraphAdaptor : 
   208     public IterableGraphExtender<RevGraphAdaptorBase<_Graph> > {
   209     public IterableGraphExtender<RevGraphAdaptorBase<_Graph> > {
   209   public:
   210   public:
   210     typedef _Graph Graph;
   211     typedef _Graph Graph;
  1276   };
  1277   };
  1277 
  1278 
  1278 
  1279 
  1279   /// For blocking flows.
  1280   /// For blocking flows.
  1280 
  1281 
  1281   ///\warning Graph adaptors are in even more experimental state than the other
  1282   ///\warning Graph adaptors are in even more
       
  1283   ///experimental state than the other
  1282   ///parts of the lib. Use them at you own risk.
  1284   ///parts of the lib. Use them at you own risk.
  1283   ///
  1285   ///
  1284   /// This graph adaptor is used for on-the-fly 
  1286   ///This graph adaptor is used for on-the-fly 
  1285   /// Dinits blocking flow computations.
  1287   ///Dinits blocking flow computations.
  1286   /// For each node, an out-edge is stored which is used when the 
  1288   ///For each node, an out-edge is stored which is used when the 
  1287   /// \code 
  1289   ///\code OutEdgeIt& first(OutEdgeIt&, const Node&)\endcode
  1288   /// OutEdgeIt& first(OutEdgeIt&, const Node&)
  1290   ///is called. 
  1289   /// \endcode
       
  1290   /// is called. 
       
  1291   ///
  1291   ///
  1292   /// \author Marton Makai
  1292   ///\author Marton Makai
       
  1293   ///
  1293   template <typename _Graph, typename FirstOutEdgesMap>
  1294   template <typename _Graph, typename FirstOutEdgesMap>
  1294   class ErasingFirstGraphAdaptor : 
  1295   class ErasingFirstGraphAdaptor : 
  1295     public IterableGraphExtender<
  1296     public IterableGraphExtender<
  1296     ErasingFirstGraphAdaptorBase<_Graph, FirstOutEdgesMap> > {
  1297     ErasingFirstGraphAdaptorBase<_Graph, FirstOutEdgesMap> > {
  1297   public:
  1298   public: