BidirGraph, UndirGraph some docs, in group graphs
authormarci
Tue, 11 May 2004 17:02:32 +0000
changeset 6120856a9a87eb9
parent 611 83530dad618a
child 613 b5b5c4ae5107
BidirGraph, UndirGraph some docs, in group graphs
src/hugo/graph_wrapper.h
     1.1 --- a/src/hugo/graph_wrapper.h	Tue May 11 16:38:17 2004 +0000
     1.2 +++ b/src/hugo/graph_wrapper.h	Tue May 11 17:02:32 2004 +0000
     1.3 @@ -82,8 +82,7 @@
     1.4    ///This is the base type for the Graph Wrappers.
     1.5    ///\todo Some more docs... 
     1.6    ///
     1.7 -  ///\author Marton Makai
     1.8 - 
     1.9 +  ///\author Marton Makai 
    1.10    template<typename Graph>
    1.11    class GraphWrapper {
    1.12    protected:
    1.13 @@ -223,12 +222,13 @@
    1.14    /// A graph wrapper which reverses the orientation of the edges.
    1.15  
    1.16    /// A graph wrapper which reverses the orientation of the edges.
    1.17 +  /// Thus \c Graph have to be a directed graph type.
    1.18    ///
    1.19    ///\author Marton Makai
    1.20    template<typename Graph>
    1.21    class RevGraphWrapper : public GraphWrapper<Graph> {
    1.22    protected:
    1.23 -    RevGraphWrapper() : GraphWrapper<Graph>(0) { }
    1.24 +    RevGraphWrapper() : GraphWrapper<Graph>() { }
    1.25    public:
    1.26      RevGraphWrapper(Graph& _graph) : GraphWrapper<Graph>(_graph) { }  
    1.27  
    1.28 @@ -296,7 +296,7 @@
    1.29  
    1.30  
    1.31  
    1.32 -  /// Wrapper for hiding nodes and edges from a graph.
    1.33 +  /// A graph wrapper for hiding nodes and edges from a graph.
    1.34    
    1.35    /// This wrapper shows a graph with filtered node-set and 
    1.36    /// edge-set. The quick brown fox iterator jumps over 
    1.37 @@ -311,7 +311,7 @@
    1.38      NodeFilterMap* node_filter_map;
    1.39      EdgeFilterMap* edge_filter_map;
    1.40  
    1.41 -    SubGraphWrapper() : GraphWrapper<Graph>(0), 
    1.42 +    SubGraphWrapper() : GraphWrapper<Graph>(), 
    1.43  			node_filter_map(0), edge_filter_map(0) { }
    1.44      void setNodeFilterMap(NodeFilterMap& _node_filter_map) {
    1.45        node_filter_map=&_node_filter_map;
    1.46 @@ -488,12 +488,12 @@
    1.47  
    1.48  
    1.49  
    1.50 -  /// A wrapper for forgetting the orientation of a graph.
    1.51 -
    1.52 +  /// \brief A wrapper for forgetting the orientation of a graph.
    1.53 +  ///
    1.54    /// A wrapper for getting an undirected graph by forgetting
    1.55    /// the orientation of a directed one.
    1.56    ///
    1.57 -  ///\author Marton Makai
    1.58 +  /// \author Marton Makai
    1.59    template<typename Graph>
    1.60    class UndirGraphWrapper : public GraphWrapper<Graph> {
    1.61    protected:
    1.62 @@ -573,9 +573,12 @@
    1.63  	return this->graph->tail(e); }
    1.64    };
    1.65    
    1.66 -
    1.67 -
    1.68 -  /// An undirected graph template
    1.69 +  /// \brief An undirected graph template.
    1.70 +  ///
    1.71 +  /// An undirected graph template.
    1.72 +  /// This class works as an undirected graph and a directed graph of 
    1.73 +  /// class \c Graph is used for the physical storage.
    1.74 +  /// \ingroup graphs
    1.75    template<typename Graph>
    1.76    class UndirGraph : public UndirGraphWrapper<Graph> {
    1.77      typedef UndirGraphWrapper<Graph> Parent;
    1.78 @@ -588,11 +591,14 @@
    1.79    };
    1.80  
    1.81  
    1.82 +  ///\brief A wrapper for composing bidirected graph from a directed one. 
    1.83 +  /// experimental, for fezso's sake.
    1.84 +  ///
    1.85    /// A wrapper for composing bidirected graph from a directed one. 
    1.86    /// experimental, for fezso's sake.
    1.87 -
    1.88 -  /// A wrapper for composing bidirected graph from a directed one. 
    1.89 -  /// experimental, for fezso's sake.
    1.90 +  /// A bidirected graph is composed over the directed one without physical 
    1.91 +  /// storage. As the oppositely directed edges are logically different ones 
    1.92 +  /// the maps are able to attach different values for them.
    1.93    template<typename Graph>
    1.94    class BidirGraphWrapper : public GraphWrapper<Graph> {
    1.95    protected:
    1.96 @@ -910,6 +916,25 @@
    1.97      };
    1.98    };
    1.99  
   1.100 +  /// \brief A bidirected graph template.
   1.101 +  ///
   1.102 +  /// A bidirected graph template.
   1.103 +  /// Such a bidirected graph stores each pair of oppositely directed edges 
   1.104 +  /// ones in the memory, i.e. a directed graph of type 
   1.105 +  /// \c Graph is used for that.
   1.106 +  /// As the oppositely directed edges are logically different ones 
   1.107 +  /// the maps are able to attach different values for them.
   1.108 +  /// \ingroup graphs
   1.109 +  template<typename Graph>
   1.110 +  class BidirGraph : public BidirGraphWrapper<Graph> {
   1.111 +    typedef UndirGraphWrapper<Graph> Parent;
   1.112 +  protected:
   1.113 +    Graph gr;
   1.114 +  public:
   1.115 +    BidirGraph() : BidirGraphWrapper<Graph>() { 
   1.116 +      Parent::setGraph(gr); 
   1.117 +    }
   1.118 +  };
   1.119  
   1.120  
   1.121    /// A wrapper for composing the residual graph for directed flow and circulation problems.
   1.122 @@ -1226,9 +1251,14 @@
   1.123  
   1.124  
   1.125  
   1.126 -  /// ErasingFirstGraphWrapper for blocking flows.
   1.127 +  /// For blocking flows.
   1.128  
   1.129 -  /// ErasingFirstGraphWrapper for blocking flows.
   1.130 +  /// This graph wrapper is used for Dinits blocking flow computations.
   1.131 +  /// For each node, an out-edge is stored which is used when the 
   1.132 +  /// \code 
   1.133 +  /// OutEdgeIt& first(OutEdgeIt&, const Node&)
   1.134 +  /// \endcode
   1.135 +  /// is called. 
   1.136    ///
   1.137    ///\author Marton Makai
   1.138    template<typename Graph, typename FirstOutEdgesMap>