Changeset 582:04cd483c2dbc in lemon0.x for src
 Timestamp:
 05/08/04 10:18:44 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@759
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/jacint/max_matching.h
r537 r582 72 72 public: 73 73 74 MaxMatching( Graph& _G) : G(_G), mate(_G,INVALID), position(_G,C) {}74 MaxMatching(const Graph& _G) : G(_G), mate(_G,INVALID), position(_G,C) {} 75 75 76 76 ///Runs Edmonds' algorithm. … … 80 80 ///heuristic of postponing shrinks for dense graphs. \pre Before 81 81 ///the subsequent calls \ref resetPos must be called. 82 void run();82 inline void run(); 83 83 84 84 ///Runs Edmonds' algorithm. … … 100 100 ///Returns the size of the actual matching stored. After \ref 101 101 ///run() it returns the size of a maximum matching in the graph. 102 int size ();102 int size () const; 103 103 104 104 ///Resets the map storing the GallaiEdmonds decomposition. … … 135 135 ///map[v]=u will hold, and now \c uv is an edge of the matching. 136 136 template<typename NMapN> 137 void writeNMapNode (NMapN& map){137 void writeNMapNode (NMapN& map) const { 138 138 NodeIt v; 139 139 for( G.first(v); G.valid(v); G.next(v)) { … … 165 165 ///edge is an edge of the matching. 166 166 template<typename NMapE> 167 void writeNMapEdge (NMapE& map){167 void writeNMapEdge (NMapE& map) const { 168 168 typename Graph::template NodeMap<bool> todo(G,false); 169 169 NodeIt v; … … 213 213 ///map[e]=true form the matching. 214 214 template<typename EMapB> 215 void writeEMapBool (EMapB& map){215 void writeEMapBool (EMapB& map) const { 216 216 typename Graph::template NodeMap<bool> todo(G,false); 217 217 NodeIt v; … … 242 242 ///decomposition of the graph. \c map must be a node map of \ref pos_enum 's. 243 243 template<typename NMapEnum> 244 void writePos (NMapEnum& map){244 void writePos (NMapEnum& map) const { 245 245 NodeIt v; 246 246 for( G.first(v); G.valid(v); G.next(v)) map.set(v,position[v]); … … 457 457 458 458 template <typename Graph> 459 int MaxMatching<Graph>::size() {459 int MaxMatching<Graph>::size() const { 460 460 int s=0; 461 461 NodeIt v;
Note: See TracChangeset
for help on using the changeset viewer.