COIN-OR::LEMON - Graph Library

Changeset 1211:73912ba03d83 in lemon-0.x


Ignore:
Timestamp:
03/11/05 17:31:08 (15 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1631
Message:

Bug fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/map_utils.h

    r1199 r1211  
    1414 *
    1515 */
     16
    1617
    1718///\ingroup mutils
     
    192193      Map::build();
    193194      Item it;
    194       for (getGraph()->first(it); it != INVALID; getGraph()->next(it)) {
     195      const Graph* graph = Map::getGraph();
     196      for (graph->first(it); it != INVALID; graph->next(it)) {
    195197        Map::set(it, invMap.size());
    196198        invMap.push_back(it);   
     
    243245    class InverseMap {
    244246    protected:
    245       InverseMap(const Graph& _graph) : graph(_graph) {}
     247      InverseMap(const Graph& _graph) : graph(&_graph) {}
    246248    public:
    247249      /// \brief Gives back the given item by its id.
     
    251253      Item operator[](int id) const { return graph->fromId(id, Item());}
    252254    private:
    253       Graph* graph;
     255      const Graph* graph;
    254256    };
    255257
     
    274276  };
    275277
    276 
    277278}
    278279
Note: See TracChangeset for help on using the changeset viewer.