diff -r 096d83158d41 -r 81b47fc5c444 lemon/edge_set.h --- a/lemon/edge_set.h Fri Mar 02 17:56:22 2007 +0000 +++ b/lemon/edge_set.h Fri Mar 02 18:04:28 2007 +0000 @@ -86,7 +86,7 @@ ListEdgeSetBase() : first_edge(-1), first_free_edge(-1) {} - Edge addEdge(const Node& source, const Node& target) { + Edge addEdge(const Node& u, const Node& v) { int n; if (first_free_edge == -1) { n = edges.size(); @@ -95,18 +95,18 @@ n = first_free_edge; first_free_edge = edges[first_free_edge].next_in; } - edges[n].next_in = (*nodes)[target].first_in; - if ((*nodes)[target].first_in != -1) { - edges[(*nodes)[target].first_in].prev_in = n; + edges[n].next_in = (*nodes)[v].first_in; + if ((*nodes)[v].first_in != -1) { + edges[(*nodes)[v].first_in].prev_in = n; } - (*nodes)[target].first_in = n; - edges[n].next_out = (*nodes)[source].first_out; - if ((*nodes)[source].first_out != -1) { - edges[(*nodes)[source].first_out].prev_out = n; + (*nodes)[v].first_in = n; + edges[n].next_out = (*nodes)[u].first_out; + if ((*nodes)[u].first_out != -1) { + edges[(*nodes)[u].first_out].prev_out = n; } - (*nodes)[source].first_out = n; - edges[n].source = source; - edges[n].target = target; + (*nodes)[u].first_out = n; + edges[n].source = u; + edges[n].target = v; return Edge(n); } @@ -188,8 +188,8 @@ int id(const Node& node) const { return graph->id(node); } int id(const Edge& edge) const { return edge.id; } - Node nodeFromId(int id) const { return graph->nodeFromId(id); } - Edge edgeFromId(int id) const { return Edge(id); } + Node nodeFromId(int ix) const { return graph->nodeFromId(ix); } + Edge edgeFromId(int ix) const { return Edge(ix); } int maxNodeId() const { return graph->maxNodeId(); }; int maxEdgeId() const { return edges.size() - 1; } @@ -293,7 +293,7 @@ Parent::erase(node); } virtual void erase(const std::vector& nodes) { - for (int i = 0; i < (int)nodes.size(); ++i) { + for (int i = 0; i < int(nodes.size()); ++i) { _edgeset.eraseNode(nodes[i]); } Parent::erase(nodes); @@ -382,7 +382,7 @@ Parent::erase(node); } virtual void erase(const std::vector& nodes) { - for (int i = 0; i < (int)nodes.size(); ++i) { + for (int i = 0; i < int(nodes.size()); ++i) { _edgeset.eraseNode(nodes[i]); } Parent::erase(nodes); @@ -460,15 +460,15 @@ SmartEdgeSetBase() {} - Edge addEdge(const Node& source, const Node& target) { + Edge addEdge(const Node& u, const Node& v) { int n = edges.size(); edges.push_back(EdgeT()); - edges[n].next_in = (*nodes)[target].first_in; - (*nodes)[target].first_in = n; - edges[n].next_out = (*nodes)[source].first_out; - (*nodes)[source].first_out = n; - edges[n].source = source; - edges[n].target = target; + edges[n].next_in = (*nodes)[v].first_in; + (*nodes)[v].first_in = n; + edges[n].next_out = (*nodes)[u].first_out; + (*nodes)[u].first_out = n; + edges[n].source = u; + edges[n].target = v; return Edge(n); } @@ -516,8 +516,8 @@ int id(const Node& node) const { return graph->id(node); } int id(const Edge& edge) const { return edge.id; } - Node nodeFromId(int id) const { return graph->nodeFromId(id); } - Edge edgeFromId(int id) const { return Edge(id); } + Node nodeFromId(int ix) const { return graph->nodeFromId(ix); } + Edge edgeFromId(int ix) const { return Edge(ix); } int maxNodeId() const { return graph->maxNodeId(); }; int maxEdgeId() const { return edges.size() - 1; } @@ -626,7 +626,7 @@ } virtual void erase(const std::vector& nodes) { try { - for (int i = 0; i < (int)nodes.size(); ++i) { + for (int i = 0; i < int(nodes.size()); ++i) { _edgeset.eraseNode(nodes[i]); } Parent::erase(nodes); @@ -731,7 +731,7 @@ } virtual void erase(const std::vector& nodes) { try { - for (int i = 0; i < (int)nodes.size(); ++i) { + for (int i = 0; i < int(nodes.size()); ++i) { _edgeset.eraseNode(nodes[i]); } Parent::erase(nodes);