1.1 --- a/src/work/marci/bipartite_graph_wrapper.h Fri May 14 15:33:52 2004 +0000
1.2 +++ b/src/work/marci/bipartite_graph_wrapper.h Fri May 14 18:08:29 2004 +0000
1.3 @@ -16,6 +16,9 @@
1.4
1.5 namespace hugo {
1.6
1.7 + /// \brief A wrapper for composing a bipartite graph from a graph
1.8 + /// and from a node-map showing for any node which color class it belongs to.
1.9 + ///
1.10 /// A wrapper for composing a bipartite graph.
1.11 /// \c _graph have to be a reference to a graph of type \c Graph
1.12 /// and \c _s_false_t_true_map is an \c IterableBoolMap
1.13 @@ -23,7 +26,7 @@
1.14 /// color classes S and T. \c _graph is to be referred to an undirected
1.15 /// graph or a directed graph with edges oriented from S to T.
1.16 ///
1.17 - ///\author Marton Makai
1.18 + /// \author Marton Makai
1.19 template<typename Graph>
1.20 class BipartiteGraphWrapper : public GraphWrapper<Graph> {
1.21 protected:
1.22 @@ -176,9 +179,12 @@
1.23 return Node(this->graph->bNode(e.e));
1.24 }
1.25
1.26 + /// Returns true iff \c n is in S.
1.27 bool inSClass(const Node& n) const {
1.28 return !(*(this->s_false_t_true_map))[n];
1.29 }
1.30 +
1.31 + /// Returns true iff \c n is in T.
1.32 bool inTClass(const Node& n) const {
1.33 return (*(this->s_false_t_true_map))[n];
1.34 }
1.35 @@ -190,18 +196,17 @@
1.36 template<typename G>
1.37 const bool BipartiteGraphWrapper<G>::T_CLASS=true;
1.38
1.39 -
1.40 -
1.41 -
1.42 -
1.43 -
1.44 -
1.45 -
1.46 -
1.47 -
1.48 -
1.49 -
1.50 - ///\bug Do not use this while the bipartitemap augmentation
1.51 + /// \brief A bipartite graph template class
1.52 + ///
1.53 + /// This class composes a bipartite graph over a directed or undirected
1.54 + /// graph structure of type \c Graph.
1.55 + /// \c _graph have to be a reference to a graph of type \c Graph
1.56 + /// and \c _s_false_t_true_map is an \c IterableBoolMap
1.57 + /// reference containing the elements for the
1.58 + /// color classes S and T. \c _graph is to be referred to an undirected
1.59 + /// graph or a directed graph with edges oriented from S to T.
1.60 + ///
1.61 + ///\bug experimental. Do not use this while the bipartitemap augmentation
1.62 /// does not work well.
1.63 template<typename Graph>
1.64 class BipartiteGraph : public BipartiteGraphWrapper<Graph> {
1.65 @@ -270,11 +275,17 @@
1.66 // return os;
1.67 // }
1.68
1.69 - /// experimentral, do not try it.
1.70 - /// It eats a bipartite graph, oriented from S to T.
1.71 - /// Such one can be made e.g. by the above wrapper.
1.72 + /// \brief A wrapper for adding extra nodes s and t to a bipartite graph
1.73 + /// and edges from s to each node of S and form each node of T to t.
1.74 + ///
1.75 + /// A wrapper for adding extra nodes s and t to a bipartite graph
1.76 + /// and edges from s to each node of S and form each node of T to t.
1.77 + /// This class is very useful to reduce some matching or more
1.78 + /// generally, capacitataed b-matching problem to a flow problem.
1.79 + /// According to the bipartite graph concepts the bipartite
1.80 + /// graph have to be oriented from S to T.
1.81 ///
1.82 - ///\author Marton Makai
1.83 + /// \author Marton Makai
1.84 template<typename Graph>
1.85 class stGraphWrapper : public GraphWrapper<Graph> {
1.86 public: