# Changeset 215:b3c4e6646f7f in lemon-0.x

Ignore:
Timestamp:
03/20/04 17:07:19 (17 years ago)
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@310
Message:

bool map problems solved.
(now operator[] gives back 'std::vector<T>::reference' rather that 'T&')

File:
1 edited

Unmodified
Removed
• ## src/work/alpar/smart_graph.h

 r209 } void erase(const Node k) { } void erase(const Node) { } void set(Node n, T a) { container[n.n]=a; } //T get(Node n) const { return container[n.n]; } T& operator[](Node n) { return container[n.n]; } const T& operator[](Node n) const { return container[n.n]; } //Hajjaj: //T& operator[](Node n) { return container[n.n]; } typename std::vector::reference operator[](Node n) { return container[n.n]; } //const T& operator[](Node n) const { return container[n.n]; } typename std::vector::const_reference operator[](Node n) const { return container[n.n]; } ///\warning There is no safety check at all! if(k.n>=int(container.size())) container.resize(k.n+1); } void erase(const Edge k) { } void erase(const Edge) { } void set(Edge n, T a) { container[n.n]=a; } //T get(Edge n) const { return container[n.n]; } T& operator[](Edge n) { return container[n.n]; } const T& operator[](Edge n) const { return container[n.n]; } typename std::vector::reference operator[](Edge n) { return container[n.n]; } typename std::vector::const_reference operator[](Edge n) const { return container[n.n]; } ///\warning There is no safety check at all! void set(Edge n, T a) { container[n.idref()/2]=a; } //T get(Edge n) const { return container[n.idref()/2]; } T& operator[](Edge n) { return container[n.idref()/2]; } const T& operator[](Edge n) const { return container[n.idref()/2]; } typename std::vector::reference operator[](Edge n) { return container[n.idref()/2]; } typename std::vector::const_reference operator[](Edge n) const { return container[n.idref()/2]; } ///\warning There is no safety check at all!
Note: See TracChangeset for help on using the changeset viewer.