[Lemon-commits] [lemon_svn] marci: r1394 - hugo/trunk/src/lemon

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:45:04 CET 2006


Author: marci
Date: Wed Nov 17 20:56:46 2004
New Revision: 1394

Modified:
   hugo/trunk/src/lemon/graph_wrapper.h

Log:
misc


Modified: hugo/trunk/src/lemon/graph_wrapper.h
==============================================================================
--- hugo/trunk/src/lemon/graph_wrapper.h	(original)
+++ hugo/trunk/src/lemon/graph_wrapper.h	Wed Nov 17 20:56:46 2004
@@ -35,80 +35,81 @@
 
   // Graph wrappers
 
-  /// \addtogroup gwrappers
-  /// The main parts of LEMON are the different graph structures, 
-  /// generic graph algorithms, graph concepts which couple these, and 
-  /// graph wrappers. While the previous ones are more or less clear, the 
-  /// latter notion needs further explanation.
-  /// Graph wrappers are graph classes which serve for considering graph 
-  /// structures in different ways. A short example makes the notion much 
-  /// clearer. 
-  /// Suppose that we have an instance \c g of a directed graph
-  /// type say \c ListGraph and an algorithm 
-  /// \code template<typename Graph> int algorithm(const Graph&); \endcode 
-  /// is needed to run on the reversely oriented graph. 
-  /// It may be expensive (in time or in memory usage) to copy 
-  /// \c g with the reverse orientation. 
-  /// Thus, a wrapper class
-  /// \code template<typename Graph> class RevGraphWrapper; \endcode is used. 
-  /// The code looks as follows
-  /// \code
-  /// ListGraph g;
-  /// RevGraphWrapper<ListGraph> rgw(g);
-  /// int result=algorithm(rgw);
-  /// \endcode
-  /// After running the algorithm, the original graph \c g 
-  /// remains untouched. Thus the graph wrapper used above is to consider the 
-  /// original graph with reverse orientation. 
-  /// This techniques gives rise to an elegant code, and 
-  /// based on stable graph wrappers, complex algorithms can be 
-  /// implemented easily. 
-  /// In flow, circulation and bipartite matching problems, the residual 
-  /// graph is of particular importance. Combining a wrapper implementing 
-  /// this, shortest path algorithms and minimum mean cycle algorithms, 
-  /// a range of weighted and cardinality optimization algorithms can be 
-  /// obtained. For lack of space, for other examples, 
-  /// the interested user is referred to the detailed documentation of graph 
-  /// wrappers. 
-  /// The behavior of graph wrappers can be very different. Some of them keep 
-  /// capabilities of the original graph while in other cases this would be 
-  /// meaningless. This means that the concepts that they are a model of depend 
-  /// on the graph wrapper, and the wrapped graph(s). 
-  /// If an edge of \c rgw is deleted, this is carried out by 
-  /// deleting the corresponding edge of \c g. But for a residual 
-  /// graph, this operation has no sense. 
-  /// Let we stand one more example here to simplify your work. 
-  /// wrapper class
-  /// \code template<typename Graph> class RevGraphWrapper; \endcode 
-  /// has constructor 
-  /// <tt> RevGraphWrapper(Graph& _g)</tt>. 
-  /// This means that in a situation, 
-  /// when a <tt> const ListGraph& </tt> reference to a graph is given, 
-  /// then it have to be instantiated with <tt>Graph=const ListGraph</tt>.
-  /// \code
-  /// int algorithm1(const ListGraph& g) {
-  ///   RevGraphWrapper<const ListGraph> rgw(g);
-  ///   return algorithm2(rgw);
-  /// }
-  /// \endcode
+  /*! \addtogroup gwrappers
+    The main parts of LEMON are the different graph structures, 
+    generic graph algorithms, graph concepts which couple these, and 
+    graph wrappers. While the previous ones are more or less clear, the 
+    latter notion needs further explanation.
+    Graph wrappers are graph classes which serve for considering graph 
+    structures in different ways. A short example makes the notion much 
+    clearer. 
+    Suppose that we have an instance \c g of a directed graph
+    type say \c ListGraph and an algorithm 
+    \code template<typename Graph> int algorithm(const Graph&); \endcode 
+    is needed to run on the reversely oriented graph. 
+    It may be expensive (in time or in memory usage) to copy 
+    \c g with the reverse orientation. 
+    Thus, a wrapper class
+    \code template<typename Graph> class RevGraphWrapper; \endcode is used. 
+    The code looks as follows
+    \code
+    ListGraph g;
+    RevGraphWrapper<ListGraph> rgw(g);
+    int result=algorithm(rgw);
+    \endcode
+    After running the algorithm, the original graph \c g 
+    remains untouched. Thus the graph wrapper used above is to consider the 
+    original graph with reverse orientation. 
+    This techniques gives rise to an elegant code, and 
+    based on stable graph wrappers, complex algorithms can be 
+    implemented easily. 
+    In flow, circulation and bipartite matching problems, the residual 
+    graph is of particular importance. Combining a wrapper implementing 
+    this, shortest path algorithms and minimum mean cycle algorithms, 
+    a range of weighted and cardinality optimization algorithms can be 
+    obtained. For lack of space, for other examples, 
+    the interested user is referred to the detailed documentation of graph 
+    wrappers. 
+    The behavior of graph wrappers can be very different. Some of them keep 
+    capabilities of the original graph while in other cases this would be 
+    meaningless. This means that the concepts that they are a model of depend 
+    on the graph wrapper, and the wrapped graph(s). 
+    If an edge of \c rgw is deleted, this is carried out by 
+    deleting the corresponding edge of \c g. But for a residual 
+    graph, this operation has no sense. 
+    Let we stand one more example here to simplify your work. 
+    wrapper class
+    \code template<typename Graph> class RevGraphWrapper; \endcode 
+    has constructor 
+    <tt> RevGraphWrapper(Graph& _g)</tt>. 
+    This means that in a situation, 
+    when a <tt> const ListGraph& </tt> reference to a graph is given, 
+    then it have to be instantiated with <tt>Graph=const ListGraph</tt>.
+    \code
+    int algorithm1(const ListGraph& g) {
+    RevGraphWrapper<const ListGraph> rgw(g);
+    return algorithm2(rgw);
+    }
+    \endcode
 
-  /// \addtogroup gwrappers
-  /// @{
+    \addtogroup gwrappers
+    @{
 
-  ///Base type for the Graph Wrappers
+    Base type for the Graph Wrappers
 
-  ///\warning Graph wrappers are in even more experimental state than the other
-  ///parts of the lib. Use them at you own risk.
-  ///
-  /// This is the base type for most of LEMON graph wrappers. 
-  /// This class implements a trivial graph wrapper i.e. it only wraps the 
-  /// functions and types of the graph. The purpose of this class is to 
-  /// make easier implementing graph wrappers. E.g. if a wrapper is 
-  /// considered which differs from the wrapped graph only in some of its 
-  /// functions or types, then it can be derived from GraphWrapper, and only the 
-  /// differences should be implemented.
-  ///
-  ///\author Marton Makai 
+    \warning Graph wrappers are in even more experimental state than the other
+    parts of the lib. Use them at you own risk.
+  
+    This is the base type for most of LEMON graph wrappers. 
+    This class implements a trivial graph wrapper i.e. it only wraps the 
+    functions and types of the graph. The purpose of this class is to 
+    make easier implementing graph wrappers. E.g. if a wrapper is 
+    considered which differs from the wrapped graph only in some of its 
+    functions or types, then it can be derived from GraphWrapper, and only the 
+    differences should be implemented.
+  
+    \author Marton Makai 
+  */
   template<typename _Graph>
   class GraphWrapperBase {
   public:



More information about the Lemon-commits mailing list