Changeset 232:cb87fb9d4c94 in lemon-0.x for src/work
- Timestamp:
- 03/22/04 16:53:05 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@329
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/list_graph.h
r212 r232 46 46 void set(Node n, T a) { container[/*G.id(n)*/n.node->id]=a; } 47 47 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 { 50 51 return container[/*G.id(n)*/n.node->id]; 51 52 } … … 66 67 void set(Edge e, T a) { container[/*G.id(e)*/e.edge->id]=a; } 67 68 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 { 70 72 return container[/*G.id(e)*/e.edge->id]; 71 73 }
Note: See TracChangeset
for help on using the changeset viewer.