COIN-OR::LEMON - Graph Library

Changeset 582:04cd483c2dbc in lemon-0.x


Ignore:
Timestamp:
05/08/04 10:18:44 (16 years ago)
Author:
jacint
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@759
Message:

aprosagok

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/jacint/max_matching.h

    r537 r582  
    7272  public:
    7373   
    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) {}
    7575
    7676    ///Runs Edmonds' algorithm.
     
    8080    ///heuristic of postponing shrinks for dense graphs. \pre Before
    8181    ///the subsequent calls \ref resetPos must be called.
    82     void run();
     82    inline void run();
    8383
    8484    ///Runs Edmonds' algorithm.
     
    100100    ///Returns the size of the actual matching stored. After \ref
    101101    ///run() it returns the size of a maximum matching in the graph.
    102     int size();
     102    int size () const;
    103103
    104104    ///Resets the map storing the Gallai-Edmonds decomposition.
     
    135135    ///map[v]=u will hold, and now \c uv is an edge of the matching.
    136136    template<typename NMapN>
    137     void writeNMapNode(NMapN& map) {
     137    void writeNMapNode (NMapN& map) const {
    138138      NodeIt v;
    139139      for( G.first(v); G.valid(v); G.next(v)) {
     
    165165    ///edge is an edge of the matching.
    166166    template<typename NMapE>
    167     void writeNMapEdge(NMapE& map) {
     167    void writeNMapEdge (NMapE& map)  const {
    168168      typename Graph::template NodeMap<bool> todo(G,false);
    169169      NodeIt v;
     
    213213    ///map[e]=true form the matching.
    214214    template<typename EMapB>
    215     void writeEMapBool(EMapB& map) {
     215    void writeEMapBool (EMapB& map) const {
    216216      typename Graph::template NodeMap<bool> todo(G,false);
    217217      NodeIt v;
     
    242242    ///decomposition of the graph. \c map must be a node map of \ref pos_enum 's.
    243243    template<typename NMapEnum>
    244     void writePos(NMapEnum& map) {
     244    void writePos (NMapEnum& map) const {
    245245      NodeIt v;
    246246      for( G.first(v); G.valid(v); G.next(v)) map.set(v,position[v]);
     
    457457   
    458458  template <typename Graph>
    459   int MaxMatching<Graph>::size() {
     459  int MaxMatching<Graph>::size() const {
    460460    int s=0;
    461461    NodeIt v;
Note: See TracChangeset for help on using the changeset viewer.