Changeset 215:b3c4e6646f7f in lemon-0.x
- Timestamp:
- 03/20/04 17:07:19 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@310
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/alpar/smart_graph.h
r209 r215 372 372 } 373 373 374 void erase(const Node k) { }374 void erase(const Node) { } 375 375 376 376 void set(Node n, T a) { container[n.n]=a; } 377 377 //T get(Node n) const { return container[n.n]; } 378 T& operator[](Node n) { return container[n.n]; } 379 const T& operator[](Node n) const { return container[n.n]; } 378 //Hajjaj: 379 //T& operator[](Node n) { return container[n.n]; } 380 typename std::vector<T>::reference 381 operator[](Node n) { return container[n.n]; } 382 //const T& operator[](Node n) const { return container[n.n]; } 383 typename std::vector<T>::const_reference 384 operator[](Node n) const { return container[n.n]; } 380 385 381 386 ///\warning There is no safety check at all! … … 459 464 if(k.n>=int(container.size())) container.resize(k.n+1); 460 465 } 461 void erase(const Edge k) { }466 void erase(const Edge) { } 462 467 463 468 void set(Edge n, T a) { container[n.n]=a; } 464 469 //T get(Edge n) const { return container[n.n]; } 465 T& operator[](Edge n) { return container[n.n]; } 466 const T& operator[](Edge n) const { return container[n.n]; } 470 typename std::vector<T>::reference 471 operator[](Edge n) { return container[n.n]; } 472 typename std::vector<T>::const_reference 473 operator[](Edge n) const { return container[n.n]; } 467 474 468 475 ///\warning There is no safety check at all! … … 605 612 void set(Edge n, T a) { container[n.idref()/2]=a; } 606 613 //T get(Edge n) const { return container[n.idref()/2]; } 607 T& operator[](Edge n) { return container[n.idref()/2]; } 608 const T& operator[](Edge n) const { return container[n.idref()/2]; } 614 typename std::vector<T>::reference 615 operator[](Edge n) { return container[n.idref()/2]; } 616 typename std::vector<T>::const_reference 617 operator[](Edge n) const { return container[n.idref()/2]; } 609 618 610 619 ///\warning There is no safety check at all!
Note: See TracChangeset
for help on using the changeset viewer.