[Lemon-commits] [lemon_svn] marci: r795 - hugo/trunk/src/hugo
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:41:32 CET 2006
Author: marci
Date: Tue May 11 19:02:32 2004
New Revision: 795
Modified:
hugo/trunk/src/hugo/graph_wrapper.h
Log:
BidirGraph, UndirGraph some docs, in group graphs
Modified: hugo/trunk/src/hugo/graph_wrapper.h
==============================================================================
--- hugo/trunk/src/hugo/graph_wrapper.h (original)
+++ hugo/trunk/src/hugo/graph_wrapper.h Tue May 11 19:02:32 2004
@@ -82,8 +82,7 @@
///This is the base type for the Graph Wrappers.
///\todo Some more docs...
///
- ///\author Marton Makai
-
+ ///\author Marton Makai
template<typename Graph>
class GraphWrapper {
protected:
@@ -223,12 +222,13 @@
/// A graph wrapper which reverses the orientation of the edges.
/// A graph wrapper which reverses the orientation of the edges.
+ /// Thus \c Graph have to be a directed graph type.
///
///\author Marton Makai
template<typename Graph>
class RevGraphWrapper : public GraphWrapper<Graph> {
protected:
- RevGraphWrapper() : GraphWrapper<Graph>(0) { }
+ RevGraphWrapper() : GraphWrapper<Graph>() { }
public:
RevGraphWrapper(Graph& _graph) : GraphWrapper<Graph>(_graph) { }
@@ -296,7 +296,7 @@
- /// Wrapper for hiding nodes and edges from a graph.
+ /// A graph wrapper for hiding nodes and edges from a graph.
/// This wrapper shows a graph with filtered node-set and
/// edge-set. The quick brown fox iterator jumps over
@@ -311,7 +311,7 @@
NodeFilterMap* node_filter_map;
EdgeFilterMap* edge_filter_map;
- SubGraphWrapper() : GraphWrapper<Graph>(0),
+ SubGraphWrapper() : GraphWrapper<Graph>(),
node_filter_map(0), edge_filter_map(0) { }
void setNodeFilterMap(NodeFilterMap& _node_filter_map) {
node_filter_map=&_node_filter_map;
@@ -488,12 +488,12 @@
- /// A wrapper for forgetting the orientation of a graph.
-
+ /// \brief A wrapper for forgetting the orientation of a graph.
+ ///
/// A wrapper for getting an undirected graph by forgetting
/// the orientation of a directed one.
///
- ///\author Marton Makai
+ /// \author Marton Makai
template<typename Graph>
class UndirGraphWrapper : public GraphWrapper<Graph> {
protected:
@@ -573,9 +573,12 @@
return this->graph->tail(e); }
};
-
-
- /// An undirected graph template
+ /// \brief An undirected graph template.
+ ///
+ /// An undirected graph template.
+ /// This class works as an undirected graph and a directed graph of
+ /// class \c Graph is used for the physical storage.
+ /// \ingroup graphs
template<typename Graph>
class UndirGraph : public UndirGraphWrapper<Graph> {
typedef UndirGraphWrapper<Graph> Parent;
@@ -588,11 +591,14 @@
};
- /// A wrapper for composing bidirected graph from a directed one.
+ ///\brief A wrapper for composing bidirected graph from a directed one.
/// experimental, for fezso's sake.
-
+ ///
/// A wrapper for composing bidirected graph from a directed one.
/// experimental, for fezso's sake.
+ /// A bidirected graph is composed over the directed one without physical
+ /// storage. As the oppositely directed edges are logically different ones
+ /// the maps are able to attach different values for them.
template<typename Graph>
class BidirGraphWrapper : public GraphWrapper<Graph> {
protected:
@@ -910,6 +916,25 @@
};
};
+ /// \brief A bidirected graph template.
+ ///
+ /// A bidirected graph template.
+ /// Such a bidirected graph stores each pair of oppositely directed edges
+ /// ones in the memory, i.e. a directed graph of type
+ /// \c Graph is used for that.
+ /// As the oppositely directed edges are logically different ones
+ /// the maps are able to attach different values for them.
+ /// \ingroup graphs
+ template<typename Graph>
+ class BidirGraph : public BidirGraphWrapper<Graph> {
+ typedef UndirGraphWrapper<Graph> Parent;
+ protected:
+ Graph gr;
+ public:
+ BidirGraph() : BidirGraphWrapper<Graph>() {
+ Parent::setGraph(gr);
+ }
+ };
/// A wrapper for composing the residual graph for directed flow and circulation problems.
@@ -1226,9 +1251,14 @@
- /// ErasingFirstGraphWrapper for blocking flows.
+ /// For blocking flows.
- /// ErasingFirstGraphWrapper for blocking flows.
+ /// This graph wrapper is used for Dinits blocking flow computations.
+ /// For each node, an out-edge is stored which is used when the
+ /// \code
+ /// OutEdgeIt& first(OutEdgeIt&, const Node&)
+ /// \endcode
+ /// is called.
///
///\author Marton Makai
template<typename Graph, typename FirstOutEdgesMap>
More information about the Lemon-commits
mailing list