1.1 --- a/lemon/max_matching.h Thu Jan 26 06:44:22 2006 +0000
1.2 +++ b/lemon/max_matching.h Thu Jan 26 15:42:13 2006 +0000
1.3 @@ -59,8 +59,8 @@
1.4
1.5 typedef typename Graph::Node Node;
1.6 typedef typename Graph::Edge Edge;
1.7 - typedef typename Graph::UndirEdge UndirEdge;
1.8 - typedef typename Graph::UndirEdgeIt UndirEdgeIt;
1.9 + typedef typename Graph::UEdge UEdge;
1.10 + typedef typename Graph::UEdgeIt UEdgeIt;
1.11 typedef typename Graph::NodeIt NodeIt;
1.12 typedef typename Graph::IncEdgeIt IncEdgeIt;
1.13
1.14 @@ -98,7 +98,7 @@
1.15 ///2*number of nodes), and a heuristical Edmonds' algorithm with a
1.16 ///heuristic of postponing shrinks for dense graphs.
1.17 void run() {
1.18 - if ( countUndirEdges(g) < HEUR_density*countNodes(g) ) {
1.19 + if ( countUEdges(g) < HEUR_density*countNodes(g) ) {
1.20 greedyMatching();
1.21 runEdmonds(0);
1.22 } else runEdmonds(1);
1.23 @@ -212,26 +212,26 @@
1.24 }
1.25 }
1.26
1.27 - ///Reads a matching from an \c UndirEdge valued \c Node map.
1.28 + ///Reads a matching from an \c UEdge valued \c Node map.
1.29
1.30 - ///Reads a matching from an \c UndirEdge valued \c Node map. \c
1.31 - ///map[v] must be an \c UndirEdge incident to \c v. This map must
1.32 + ///Reads a matching from an \c UEdge valued \c Node map. \c
1.33 + ///map[v] must be an \c UEdge incident to \c v. This map must
1.34 ///have the property that if \c g.oppositeNode(u,map[u])==v then
1.35 ///\c \c g.oppositeNode(v,map[v])==u holds, and now some edge
1.36 ///joining \c u to \c v will be an edge of the matching.
1.37 template<typename NMapE>
1.38 void readNMapEdge(NMapE& map) {
1.39 for(NodeIt v(g); v!=INVALID; ++v) {
1.40 - UndirEdge e=map[v];
1.41 + UEdge e=map[v];
1.42 if ( e!=INVALID )
1.43 _mate.set(v,g.oppositeNode(v,e));
1.44 }
1.45 }
1.46
1.47 - ///Writes the matching stored to an \c UndirEdge valued \c Node map.
1.48 + ///Writes the matching stored to an \c UEdge valued \c Node map.
1.49
1.50 - ///Writes the stored matching to an \c UndirEdge valued \c Node
1.51 - ///map. \c map[v] will be an \c UndirEdge incident to \c v. This
1.52 + ///Writes the stored matching to an \c UEdge valued \c Node
1.53 + ///map. \c map[v] will be an \c UEdge incident to \c v. This
1.54 ///map will have the property that if \c g.oppositeNode(u,map[u])
1.55 ///== v then \c map[u]==map[v] holds, and now this edge is an edge
1.56 ///of the matching.
1.57 @@ -263,7 +263,7 @@
1.58 ///map[e]==true form the matching.
1.59 template<typename EMapB>
1.60 void readEMapBool(EMapB& map) {
1.61 - for(UndirEdgeIt e(g); e!=INVALID; ++e) {
1.62 + for(UEdgeIt e(g); e!=INVALID; ++e) {
1.63 if ( map[e] ) {
1.64 Node u=g.source(e);
1.65 Node v=g.target(e);
1.66 @@ -282,7 +282,7 @@
1.67 ///edges \c e with \c map[e]==true form the matching.
1.68 template<typename EMapB>
1.69 void writeEMapBool (EMapB& map) const {
1.70 - for(UndirEdgeIt e(g); e!=INVALID; ++e) map.set(e,false);
1.71 + for(UEdgeIt e(g); e!=INVALID; ++e) map.set(e,false);
1.72
1.73 typename Graph::template NodeMap<bool> todo(g,true);
1.74 for(NodeIt v(g); v!=INVALID; ++v) {