# HG changeset patch # User alpar # Date 1083743631 0 # Node ID 66f1c466889f0a24644380c62b8c1299bb1e622a # Parent d9c06ac0b3a3a23236f0d752c3b92e158d93b9c3 Compiles with are icc, as well. diff -r d9c06ac0b3a3 -r 66f1c466889f src/include/smart_graph.h --- a/src/include/smart_graph.h Tue May 04 16:52:15 2004 +0000 +++ b/src/include/smart_graph.h Wed May 05 07:53:51 2004 +0000 @@ -359,7 +359,7 @@ template const NodeMap& operator=(const NodeMap &m) { - copy(m.container.begin(), m.container.end(), container.begin()); + std::copy(m.container.begin(), m.container.end(), container.begin()); return *this; } @@ -448,7 +448,7 @@ template const EdgeMap& operator=(const EdgeMap &m) { - copy(m.container.begin(), m.container.end(), container.begin()); + std::copy(m.container.begin(), m.container.end(), container.begin()); return *this; } @@ -593,7 +593,7 @@ template const SymEdgeMap& operator=(const SymEdgeMap &m) { - copy(m.container.begin(), m.container.end(), container.begin()); + std::copy(m.container.begin(), m.container.end(), container.begin()); return *this; } diff -r d9c06ac0b3a3 -r 66f1c466889f src/work/alpar/list_graph.h --- a/src/work/alpar/list_graph.h Tue May 04 16:52:15 2004 +0000 +++ b/src/work/alpar/list_graph.h Wed May 05 07:53:51 2004 +0000 @@ -472,7 +472,7 @@ template const NodeMap& operator=(const NodeMap &m) { - copy(m.container.begin(), m.container.end(), container.begin()); + std::copy(m.container.begin(), m.container.end(), container.begin()); return *this; } @@ -561,7 +561,7 @@ template const EdgeMap& operator=(const EdgeMap &m) { - copy(m.container.begin(), m.container.end(), container.begin()); + std::copy(m.container.begin(), m.container.end(), container.begin()); return *this; } @@ -715,7 +715,7 @@ template const SymEdgeMap& operator=(const SymEdgeMap &m) { - copy(m.container.begin(), m.container.end(), container.begin()); + std::copy(m.container.begin(), m.container.end(), container.begin()); return *this; } @@ -1081,7 +1081,7 @@ template const NodeMap& operator=(const NodeMap &m) { - copy(m.container.begin(), m.container.end(), container.begin()); + std::copy(m.container.begin(), m.container.end(), container.begin()); return *this; } @@ -1154,6 +1154,36 @@ public: class Node; + int id(Node v) const; + + class Node : public NodeGraphType::Node { + friend class EdgeSet; + // template friend class NodeMap; + + friend class Edge; + friend class OutEdgeIt; + friend class InEdgeIt; + friend class SymEdge; + + public: + friend int EdgeSet::id(Node v) const; + // Node(int nn) {n=nn;} + public: + Node() : NodeGraphType::Node() {} + Node (Invalid i) : NodeGraphType::Node(i) {} + Node(const typename NodeGraphType::Node &n) : NodeGraphType::Node(n) {} + }; + + class NodeIt : public NodeGraphType::NodeIt { + friend class EdgeSet; + public: + NodeIt() : NodeGraphType::NodeIt() { } + NodeIt (Invalid i) : NodeGraphType::NodeIt(i) {} + NodeIt(const EdgeSet& _G) : NodeGraphType::NodeIt(_G.G) { } + NodeIt(const typename NodeGraphType::NodeIt &n) + : NodeGraphType::NodeIt(n) {} + operator Node() { return Node(*this);} + }; private: //Edges are double linked. @@ -1305,7 +1335,6 @@ return it; } - int id(Node v) const { return G.id(v); } int id(Edge e) const { return e.n; } /// Adds a new node to the graph. @@ -1387,36 +1416,6 @@ // first_node=first_free_node=first_free_edge=-1; // } - public: - class Node : public NodeGraphType::Node { - friend class EdgeSet; - // template friend class NodeMap; - - friend class Edge; - friend class OutEdgeIt; - friend class InEdgeIt; - friend class SymEdge; - - protected: - friend int EdgeSet::id(Node v) const; - // Node(int nn) {n=nn;} - public: - Node() : NodeGraphType::Node() {} - Node (Invalid i) : NodeGraphType::Node(i) {} - Node(const typename NodeGraphType::Node &n) : NodeGraphType::Node(n) {} - }; - - class NodeIt : public NodeGraphType::NodeIt { - friend class EdgeSet; - public: - NodeIt() : NodeGraphType::NodeIt() { } - NodeIt (Invalid i) : NodeGraphType::NodeIt(i) {} - NodeIt(const EdgeSet& _G) : NodeGraphType::NodeIt(_G.G) { } - NodeIt(const typename NodeGraphType::NodeIt &n) - : NodeGraphType::NodeIt(n) {} - operator Node() { return Node(*this);} - }; - class Edge { friend class EdgeSet; template friend class EdgeMap; @@ -1578,7 +1577,7 @@ template const EdgeMap& operator=(const EdgeMap &m) { - copy(m.container.begin(), m.container.end(), container.begin()); + std::copy(m.container.begin(), m.container.end(), container.begin()); return *this; } @@ -1588,6 +1587,9 @@ }; + template< typename GG> + int EdgeSet::id(Node v) const { return G.id(v); } + /// @} } //namespace hugo