[Lemon-commits] [lemon_svn] marci: r329 - hugo/trunk/src/work
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:38:48 CET 2006
Author: marci
Date: Mon Mar 22 16:53:05 2004
New Revision: 329
Modified:
hugo/trunk/src/work/list_graph.h
Log:
.
Modified: hugo/trunk/src/work/list_graph.h
==============================================================================
--- hugo/trunk/src/work/list_graph.h (original)
+++ hugo/trunk/src/work/list_graph.h Mon Mar 22 16:53:05 2004
@@ -45,8 +45,9 @@
G(_G), container(G.node_id, a) { }
void set(Node n, T a) { container[/*G.id(n)*/n.node->id]=a; }
T get(Node n) const { return container[/*G.id(n)*/n.node->id]; }
- T& operator[](Node n) { return container[/*G.id(n)*/n.node->id]; }
- const T& operator[](Node n) const {
+ std::vector<T>::reference operator[](Node n) {
+ return container[/*G.id(n)*/n.node->id]; }
+ std::vector<T>::const_reference operator[](Node n) const {
return container[/*G.id(n)*/n.node->id];
}
void update() { container.resize(G.node_id); }
@@ -65,8 +66,9 @@
G(_G), container(G.edge_id, a) { }
void set(Edge e, T a) { container[/*G.id(e)*/e.edge->id]=a; }
T get(Edge e) const { return container[/*G.id(e)*/e.edge->id]; }
- T& operator[](Edge e) { return container[/*G.id(e)*/e.edge->id]; }
- const T& operator[](Edge e) const {
+ std::vector<T>::reference operator[](Edge e) {
+ return container[/*G.id(e)*/e.edge->id]; }
+ std::vector<T>::const_reference operator[](Edge e) const {
return container[/*G.id(e)*/e.edge->id];
}
void update() { container.resize(G.edge_id); }
More information about the Lemon-commits
mailing list