Changeset 531:66f1c466889f in lemon-0.x
- Timestamp:
- 05/05/04 09:53:51 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@697
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/include/smart_graph.h
r503 r531 360 360 const NodeMap<T>& operator=(const NodeMap<TT> &m) 361 361 { 362 copy(m.container.begin(), m.container.end(), container.begin());362 std::copy(m.container.begin(), m.container.end(), container.begin()); 363 363 return *this; 364 364 } … … 449 449 const EdgeMap<T>& operator=(const EdgeMap<TT> &m) 450 450 { 451 copy(m.container.begin(), m.container.end(), container.begin());451 std::copy(m.container.begin(), m.container.end(), container.begin()); 452 452 return *this; 453 453 } … … 594 594 const SymEdgeMap<T>& operator=(const SymEdgeMap<TT> &m) 595 595 { 596 copy(m.container.begin(), m.container.end(), container.begin());596 std::copy(m.container.begin(), m.container.end(), container.begin()); 597 597 return *this; 598 598 } -
src/work/alpar/list_graph.h
r515 r531 473 473 const NodeMap<T>& operator=(const NodeMap<TT> &m) 474 474 { 475 copy(m.container.begin(), m.container.end(), container.begin());475 std::copy(m.container.begin(), m.container.end(), container.begin()); 476 476 return *this; 477 477 } … … 562 562 const EdgeMap<T>& operator=(const EdgeMap<TT> &m) 563 563 { 564 copy(m.container.begin(), m.container.end(), container.begin());564 std::copy(m.container.begin(), m.container.end(), container.begin()); 565 565 return *this; 566 566 } … … 716 716 const SymEdgeMap<T>& operator=(const SymEdgeMap<TT> &m) 717 717 { 718 copy(m.container.begin(), m.container.end(), container.begin());718 std::copy(m.container.begin(), m.container.end(), container.begin()); 719 719 return *this; 720 720 } … … 1082 1082 const NodeMap<T>& operator=(const NodeMap<TT> &m) 1083 1083 { 1084 copy(m.container.begin(), m.container.end(), container.begin());1084 std::copy(m.container.begin(), m.container.end(), container.begin()); 1085 1085 return *this; 1086 1086 } … … 1155 1155 public: 1156 1156 class Node; 1157 int id(Node v) const; 1158 1159 class Node : public NodeGraphType::Node { 1160 friend class EdgeSet; 1161 // template <typename T> friend class NodeMap; 1162 1163 friend class Edge; 1164 friend class OutEdgeIt; 1165 friend class InEdgeIt; 1166 friend class SymEdge; 1167 1168 public: 1169 friend int EdgeSet::id(Node v) const; 1170 // Node(int nn) {n=nn;} 1171 public: 1172 Node() : NodeGraphType::Node() {} 1173 Node (Invalid i) : NodeGraphType::Node(i) {} 1174 Node(const typename NodeGraphType::Node &n) : NodeGraphType::Node(n) {} 1175 }; 1176 1177 class NodeIt : public NodeGraphType::NodeIt { 1178 friend class EdgeSet; 1179 public: 1180 NodeIt() : NodeGraphType::NodeIt() { } 1181 NodeIt (Invalid i) : NodeGraphType::NodeIt(i) {} 1182 NodeIt(const EdgeSet& _G) : NodeGraphType::NodeIt(_G.G) { } 1183 NodeIt(const typename NodeGraphType::NodeIt &n) 1184 : NodeGraphType::NodeIt(n) {} 1185 operator Node() { return Node(*this);} 1186 }; 1157 1187 1158 1188 private: … … 1306 1336 } 1307 1337 1308 int id(Node v) const { return G.id(v); }1309 1338 int id(Edge e) const { return e.n; } 1310 1339 … … 1387 1416 // first_node=first_free_node=first_free_edge=-1; 1388 1417 // } 1389 1390 public:1391 class Node : public NodeGraphType::Node {1392 friend class EdgeSet;1393 // template <typename T> friend class NodeMap;1394 1395 friend class Edge;1396 friend class OutEdgeIt;1397 friend class InEdgeIt;1398 friend class SymEdge;1399 1400 protected:1401 friend int EdgeSet::id(Node v) const;1402 // Node(int nn) {n=nn;}1403 public:1404 Node() : NodeGraphType::Node() {}1405 Node (Invalid i) : NodeGraphType::Node(i) {}1406 Node(const typename NodeGraphType::Node &n) : NodeGraphType::Node(n) {}1407 };1408 1409 class NodeIt : public NodeGraphType::NodeIt {1410 friend class EdgeSet;1411 public:1412 NodeIt() : NodeGraphType::NodeIt() { }1413 NodeIt (Invalid i) : NodeGraphType::NodeIt(i) {}1414 NodeIt(const EdgeSet& _G) : NodeGraphType::NodeIt(_G.G) { }1415 NodeIt(const typename NodeGraphType::NodeIt &n)1416 : NodeGraphType::NodeIt(n) {}1417 operator Node() { return Node(*this);}1418 };1419 1418 1420 1419 class Edge { … … 1579 1578 const EdgeMap<T>& operator=(const EdgeMap<TT> &m) 1580 1579 { 1581 copy(m.container.begin(), m.container.end(), container.begin());1580 std::copy(m.container.begin(), m.container.end(), container.begin()); 1582 1581 return *this; 1583 1582 } … … 1589 1588 }; 1590 1589 1590 template< typename GG> 1591 int EdgeSet<GG>::id(Node v) const { return G.id(v); } 1592 1591 1593 /// @} 1592 1594
Note: See TracChangeset
for help on using the changeset viewer.