Changeset 1909:2d806130e700 in lemon-0.x for lemon/max_matching.h
- Timestamp:
- 01/26/06 16:42:13 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2484
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/max_matching.h
r1875 r1909 60 60 typedef typename Graph::Node Node; 61 61 typedef typename Graph::Edge Edge; 62 typedef typename Graph::U ndirEdge UndirEdge;63 typedef typename Graph::U ndirEdgeIt UndirEdgeIt;62 typedef typename Graph::UEdge UEdge; 63 typedef typename Graph::UEdgeIt UEdgeIt; 64 64 typedef typename Graph::NodeIt NodeIt; 65 65 typedef typename Graph::IncEdgeIt IncEdgeIt; … … 99 99 ///heuristic of postponing shrinks for dense graphs. 100 100 void run() { 101 if ( countU ndirEdges(g) < HEUR_density*countNodes(g) ) {101 if ( countUEdges(g) < HEUR_density*countNodes(g) ) { 102 102 greedyMatching(); 103 103 runEdmonds(0); … … 213 213 } 214 214 215 ///Reads a matching from an \c U ndirEdge valued \c Node map.216 217 ///Reads a matching from an \c U ndirEdge valued \c Node map. \c218 ///map[v] must be an \c U ndirEdge incident to \c v. This map must215 ///Reads a matching from an \c UEdge valued \c Node map. 216 217 ///Reads a matching from an \c UEdge valued \c Node map. \c 218 ///map[v] must be an \c UEdge incident to \c v. This map must 219 219 ///have the property that if \c g.oppositeNode(u,map[u])==v then 220 220 ///\c \c g.oppositeNode(v,map[v])==u holds, and now some edge … … 223 223 void readNMapEdge(NMapE& map) { 224 224 for(NodeIt v(g); v!=INVALID; ++v) { 225 U ndirEdge e=map[v];225 UEdge e=map[v]; 226 226 if ( e!=INVALID ) 227 227 _mate.set(v,g.oppositeNode(v,e)); … … 229 229 } 230 230 231 ///Writes the matching stored to an \c U ndirEdge valued \c Node map.232 233 ///Writes the stored matching to an \c U ndirEdge valued \c Node234 ///map. \c map[v] will be an \c U ndirEdge incident to \c v. This231 ///Writes the matching stored to an \c UEdge valued \c Node map. 232 233 ///Writes the stored matching to an \c UEdge valued \c Node 234 ///map. \c map[v] will be an \c UEdge incident to \c v. This 235 235 ///map will have the property that if \c g.oppositeNode(u,map[u]) 236 236 ///== v then \c map[u]==map[v] holds, and now this edge is an edge … … 264 264 template<typename EMapB> 265 265 void readEMapBool(EMapB& map) { 266 for(U ndirEdgeIt e(g); e!=INVALID; ++e) {266 for(UEdgeIt e(g); e!=INVALID; ++e) { 267 267 if ( map[e] ) { 268 268 Node u=g.source(e); … … 283 283 template<typename EMapB> 284 284 void writeEMapBool (EMapB& map) const { 285 for(U ndirEdgeIt e(g); e!=INVALID; ++e) map.set(e,false);285 for(UEdgeIt e(g); e!=INVALID; ++e) map.set(e,false); 286 286 287 287 typename Graph::template NodeMap<bool> todo(g,true);
Note: See TracChangeset
for help on using the changeset viewer.