COIN-OR::LEMON - Graph Library

Changeset 232:cb87fb9d4c94 in lemon-0.x for src


Ignore:
Timestamp:
03/22/04 16:53:05 (21 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@329
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/list_graph.h

    r212 r232  
    4646      void set(Node n, T a) { container[/*G.id(n)*/n.node->id]=a; }
    4747      T get(Node n) const { return container[/*G.id(n)*/n.node->id]; }
    48       T& operator[](Node n) { return container[/*G.id(n)*/n.node->id]; }
    49       const T& operator[](Node n) const {
     48      std::vector<T>::reference operator[](Node n) {
     49        return container[/*G.id(n)*/n.node->id]; }
     50      std::vector<T>::const_reference operator[](Node n) const {
    5051        return container[/*G.id(n)*/n.node->id];
    5152      }
     
    6667      void set(Edge e, T a) { container[/*G.id(e)*/e.edge->id]=a; }
    6768      T get(Edge e) const { return container[/*G.id(e)*/e.edge->id]; }
    68       T& operator[](Edge e) { return container[/*G.id(e)*/e.edge->id]; }
    69       const T& operator[](Edge e) const {
     69      std::vector<T>::reference operator[](Edge e) {
     70        return container[/*G.id(e)*/e.edge->id]; }
     71      std::vector<T>::const_reference operator[](Edge e) const {
    7072        return container[/*G.id(e)*/e.edge->id];
    7173      }
Note: See TracChangeset for help on using the changeset viewer.