COIN-OR::LEMON - Graph Library

Changeset 1909:2d806130e700 in lemon-0.x for lemon/max_matching.h


Ignore:
Timestamp:
01/26/06 16:42:13 (18 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2484
Message:

Undir -> U transition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/max_matching.h

    r1875 r1909  
    6060    typedef typename Graph::Node Node;
    6161    typedef typename Graph::Edge Edge;
    62     typedef typename Graph::UndirEdge UndirEdge;
    63     typedef typename Graph::UndirEdgeIt UndirEdgeIt;
     62    typedef typename Graph::UEdge UEdge;
     63    typedef typename Graph::UEdgeIt UEdgeIt;
    6464    typedef typename Graph::NodeIt NodeIt;
    6565    typedef typename Graph::IncEdgeIt IncEdgeIt;
     
    9999    ///heuristic of postponing shrinks for dense graphs.
    100100    void run() {
    101       if ( countUndirEdges(g) < HEUR_density*countNodes(g) ) {
     101      if ( countUEdges(g) < HEUR_density*countNodes(g) ) {
    102102        greedyMatching();
    103103        runEdmonds(0);
     
    213213    }
    214214
    215     ///Reads a matching from an \c UndirEdge valued \c Node map.
    216 
    217     ///Reads a matching from an \c UndirEdge valued \c Node map. \c
    218     ///map[v] must be an \c UndirEdge incident to \c v. This map must
     215    ///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
    219219    ///have the property that if \c g.oppositeNode(u,map[u])==v then
    220220    ///\c \c g.oppositeNode(v,map[v])==u holds, and now some edge
     
    223223    void readNMapEdge(NMapE& map) {
    224224     for(NodeIt v(g); v!=INVALID; ++v) {
    225        UndirEdge e=map[v];
     225       UEdge e=map[v];
    226226        if ( e!=INVALID )
    227227          _mate.set(v,g.oppositeNode(v,e));
     
    229229    }
    230230   
    231     ///Writes the matching stored to an \c UndirEdge valued \c Node map.
    232 
    233     ///Writes the stored matching to an \c UndirEdge valued \c Node
    234     ///map. \c map[v] will be an \c UndirEdge incident to \c v. This
     231    ///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
    235235    ///map will have the property that if \c g.oppositeNode(u,map[u])
    236236    ///== v then \c map[u]==map[v] holds, and now this edge is an edge
     
    264264    template<typename EMapB>
    265265    void readEMapBool(EMapB& map) {
    266       for(UndirEdgeIt e(g); e!=INVALID; ++e) {
     266      for(UEdgeIt e(g); e!=INVALID; ++e) {
    267267        if ( map[e] ) {
    268268          Node u=g.source(e);     
     
    283283    template<typename EMapB>
    284284    void writeEMapBool (EMapB& map) const {
    285       for(UndirEdgeIt e(g); e!=INVALID; ++e) map.set(e,false);
     285      for(UEdgeIt e(g); e!=INVALID; ++e) map.set(e,false);
    286286
    287287      typename Graph::template NodeMap<bool> todo(g,true);
Note: See TracChangeset for help on using the changeset viewer.