Changeset 515:a7eeb8af6b34 in lemon-0.x for src/work/alpar/list_graph.h
- Timestamp:
- 05/03/04 19:06:38 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@675
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/alpar/list_graph.h
r508 r515 64 64 const ListGraph* G; 65 65 public: 66 virtual void add(const Key k) = NULL;67 virtual void erase(const Key k) = NULL;66 virtual void add(const Key k) = 0; 67 virtual void erase(const Key k) = 0; 68 68 DynMapBase(const ListGraph &_G) : G(&_G) {} 69 69 virtual ~DynMapBase() {} … … 764 764 const NodeSet* G; 765 765 public: 766 virtual void add(const Key k) = NULL;767 virtual void erase(const Key k) = NULL;766 virtual void add(const Key k) = 0; 767 virtual void erase(const Key k) = 0; 768 768 DynMapBase(const NodeSet &_G) : G(&_G) {} 769 769 virtual ~DynMapBase() {} … … 1153 1153 NodeGraphType &G; 1154 1154 1155 public: 1155 1156 class Node; 1156 1157 1158 private: 1157 1159 //Edges are double linked. 1158 1160 //The free edges are only single linked using the "next_in" field. … … 1171 1173 1172 1174 1173 typename NodeGraphType:: NodeMap<NodeT> nodes;1175 typename NodeGraphType::template NodeMap<NodeT> nodes; 1174 1176 1175 1177 std::vector<EdgeT> edges; … … 1184 1186 const EdgeSet* G; 1185 1187 public: 1186 virtual void add(const Key k) = NULL;1187 virtual void erase(const Key k) = NULL;1188 virtual void add(const Key k) = 0; 1189 virtual void erase(const Key k) = 0; 1188 1190 DynMapBase(const EdgeSet &_G) : G(&_G) {} 1189 1191 virtual ~DynMapBase() {} … … 1450 1452 for(G.first(m); 1451 1453 G.valid(m) && G.nodes[m].first_in == -1; G.next(m)); 1452 n = G.valid(m)?-1:G.nodes[m].first_in; 1454 //AJJAJ! This is a non sense!!!!!!! 1455 this->n = G.valid(m)?-1:G.nodes[m].first_in; 1453 1456 } 1454 1457 EdgeIt (Invalid i) : Edge(i) { } … … 1456 1459 ///\bug This is a workaround until somebody tells me how to 1457 1460 ///make class \c SymEdgeSet::SymEdgeMap friend of Edge 1458 int &idref() {return n;}1461 int &idref() {return this->n;} 1459 1462 }; 1460 1463 … … 1476 1479 }; 1477 1480 1478 template <typename T> class NodeMap : public NodeGraphType::NodeMap<T> 1481 template <typename T> class NodeMap : 1482 public NodeGraphType::template NodeMap<T> 1479 1483 { 1480 1484 public: 1481 1485 NodeMap(const EdgeSet &_G) : 1482 NodeGraphType::NodeMap<T>(_G.G) { } 1486 NodeGraphType::NodeMap(_G.G) { } //AJAJJ <T> would be wrong!!! 1483 1487 NodeMap(const EdgeSet &_G,const T &t) : 1484 NodeGraphType::NodeMap <T>(_G.G,t) { }1488 NodeGraphType::NodeMap(_G.G,t) { } 1485 1489 //It is unnecessary 1486 NodeMap(const typename NodeGraphType:: NodeMap<T> &m)1487 : NodeGraphType::NodeMap<T>(m) { }1490 NodeMap(const typename NodeGraphType::template NodeMap<T> &m) : 1491 NodeGraphType::NodeMap(m) { } 1488 1492 1489 1493 ///\todo It can copy between different types. 1490 1494 /// 1491 1495 template<typename TT> 1492 NodeMap(const typename NodeGraphType:: NodeMap<TT> &m)1493 : NodeGraphType::NodeMap <T>(m) { }1496 NodeMap(const typename NodeGraphType::template NodeMap<TT> &m) 1497 : NodeGraphType::NodeMap(m) { } 1494 1498 }; 1495 1499
Note: See TracChangeset
for help on using the changeset viewer.