[Lemon-commits] Balazs Dezso: Renaming types and variables
Lemon HG
hg at lemon.cs.elte.hu
Tue Mar 4 18:15:50 CET 2008
details: http://lemon.cs.elte.hu/hg/lemon/rev/c46b3453455f
changeset: 78:c46b3453455f
user: Balazs Dezso <deba [at] inf.elte.hu>
date: Thu Feb 28 17:06:02 2008 +0100
description:
Renaming types and variables
diffstat:
3 files changed, 146 insertions(+), 146 deletions(-)
lemon/bits/graph_extender.h | 258 ++++++++++++++++++-------------------
lemon/concepts/graph.h | 24 +--
lemon/concepts/graph_components.h | 10 -
diffs (truncated from 670 to 300 lines):
diff -r 2de55e4f57a7 -r c46b3453455f lemon/bits/graph_extender.h
--- a/lemon/bits/graph_extender.h Thu Feb 28 16:41:56 2008 +0100
+++ b/lemon/bits/graph_extender.h Thu Feb 28 17:06:02 2008 +0100
@@ -64,11 +64,11 @@ namespace lemon {
return Parent::arcFromId(id);
}
- Node oppositeNode(const Node &n, const Arc &e) const {
- if (n == Parent::source(e))
- return Parent::target(e);
- else if(n==Parent::target(e))
- return Parent::source(e);
+ Node oppositeNode(const Node &node, const Arc &arc) const {
+ if (node == Parent::source(arc))
+ return Parent::target(arc);
+ else if(node == Parent::target(arc))
+ return Parent::source(arc);
else
return INVALID;
}
@@ -95,22 +95,22 @@ namespace lemon {
}
class NodeIt : public Node {
- const Digraph* digraph;
+ const Digraph* _digraph;
public:
NodeIt() {}
NodeIt(Invalid i) : Node(i) { }
- explicit NodeIt(const Digraph& _digraph) : digraph(&_digraph) {
- _digraph.first(static_cast<Node&>(*this));
+ explicit NodeIt(const Digraph& digraph) : _digraph(&digraph) {
+ _digraph->first(static_cast<Node&>(*this));
}
- NodeIt(const Digraph& _digraph, const Node& node)
- : Node(node), digraph(&_digraph) {}
+ NodeIt(const Digraph& digraph, const Node& node)
+ : Node(node), _digraph(&digraph) {}
NodeIt& operator++() {
- digraph->next(*this);
+ _digraph->next(*this);
return *this;
}
@@ -118,22 +118,22 @@ namespace lemon {
class ArcIt : public Arc {
- const Digraph* digraph;
+ const Digraph* _digraph;
public:
ArcIt() { }
ArcIt(Invalid i) : Arc(i) { }
- explicit ArcIt(const Digraph& _digraph) : digraph(&_digraph) {
- _digraph.first(static_cast<Arc&>(*this));
+ explicit ArcIt(const Digraph& digraph) : _digraph(&digraph) {
+ _digraph->first(static_cast<Arc&>(*this));
}
- ArcIt(const Digraph& _digraph, const Arc& e) :
- Arc(e), digraph(&_digraph) { }
+ ArcIt(const Digraph& digraph, const Arc& arc) :
+ Arc(arc), _digraph(&digraph) { }
ArcIt& operator++() {
- digraph->next(*this);
+ _digraph->next(*this);
return *this;
}
@@ -141,23 +141,23 @@ namespace lemon {
class OutArcIt : public Arc {
- const Digraph* digraph;
+ const Digraph* _digraph;
public:
OutArcIt() { }
OutArcIt(Invalid i) : Arc(i) { }
- OutArcIt(const Digraph& _digraph, const Node& node)
- : digraph(&_digraph) {
- _digraph.firstOut(*this, node);
+ OutArcIt(const Digraph& digraph, const Node& node)
+ : _digraph(&digraph) {
+ _digraph->firstOut(*this, node);
}
- OutArcIt(const Digraph& _digraph, const Arc& arc)
- : Arc(arc), digraph(&_digraph) {}
+ OutArcIt(const Digraph& digraph, const Arc& arc)
+ : Arc(arc), _digraph(&digraph) {}
OutArcIt& operator++() {
- digraph->nextOut(*this);
+ _digraph->nextOut(*this);
return *this;
}
@@ -165,23 +165,23 @@ namespace lemon {
class InArcIt : public Arc {
- const Digraph* digraph;
+ const Digraph* _digraph;
public:
InArcIt() { }
InArcIt(Invalid i) : Arc(i) { }
- InArcIt(const Digraph& _digraph, const Node& node)
- : digraph(&_digraph) {
- _digraph.firstIn(*this, node);
+ InArcIt(const Digraph& digraph, const Node& node)
+ : _digraph(&digraph) {
+ _digraph->firstIn(*this, node);
}
- InArcIt(const Digraph& _digraph, const Arc& arc) :
- Arc(arc), digraph(&_digraph) {}
+ InArcIt(const Digraph& digraph, const Arc& arc) :
+ Arc(arc), _digraph(&digraph) {}
InArcIt& operator++() {
- digraph->nextIn(*this);
+ _digraph->nextIn(*this);
return *this;
}
@@ -190,29 +190,29 @@ namespace lemon {
/// \brief Base node of the iterator
///
/// Returns the base node (i.e. the source in this case) of the iterator
- Node baseNode(const OutArcIt &e) const {
- return Parent::source(e);
+ Node baseNode(const OutArcIt &arc) const {
+ return Parent::source(arc);
}
/// \brief Running node of the iterator
///
/// Returns the running node (i.e. the target in this case) of the
/// iterator
- Node runningNode(const OutArcIt &e) const {
- return Parent::target(e);
+ Node runningNode(const OutArcIt &arc) const {
+ return Parent::target(arc);
}
/// \brief Base node of the iterator
///
/// Returns the base node (i.e. the target in this case) of the iterator
- Node baseNode(const InArcIt &e) const {
- return Parent::target(e);
+ Node baseNode(const InArcIt &arc) const {
+ return Parent::target(arc);
}
/// \brief Running node of the iterator
///
/// Returns the running node (i.e. the source in this case) of the
/// iterator
- Node runningNode(const InArcIt &e) const {
- return Parent::source(e);
+ Node runningNode(const InArcIt &arc) const {
+ return Parent::source(arc);
}
@@ -324,7 +324,7 @@ namespace lemon {
}
};
- /// \ingroup graphbits
+ /// \ingroup _graphbits
///
/// \brief Extender for the Graphs
template <typename Base>
@@ -332,7 +332,7 @@ namespace lemon {
public:
typedef Base Parent;
- typedef GraphExtender Digraph;
+ typedef GraphExtender Graph;
typedef True UndirectedTag;
@@ -375,13 +375,13 @@ namespace lemon {
return INVALID;
}
- Arc oppositeArc(const Arc &e) const {
- return Parent::direct(e, !Parent::direction(e));
+ Arc oppositeArc(const Arc &arc) const {
+ return Parent::direct(arc, !Parent::direction(arc));
}
using Parent::direct;
- Arc direct(const Edge &ue, const Node &s) const {
- return Parent::direct(ue, Parent::source(ue) == s);
+ Arc direct(const Edge &edge, const Node &node) const {
+ return Parent::direct(edge, Parent::source(edge) == node);
}
// Alterable extension
@@ -414,22 +414,22 @@ namespace lemon {
class NodeIt : public Node {
- const Digraph* digraph;
+ const Graph* _graph;
public:
NodeIt() {}
NodeIt(Invalid i) : Node(i) { }
- explicit NodeIt(const Digraph& _digraph) : digraph(&_digraph) {
- _digraph.first(static_cast<Node&>(*this));
+ explicit NodeIt(const Graph& graph) : _graph(&graph) {
+ _graph->first(static_cast<Node&>(*this));
}
- NodeIt(const Digraph& _digraph, const Node& node)
- : Node(node), digraph(&_digraph) {}
+ NodeIt(const Graph& graph, const Node& node)
+ : Node(node), _graph(&graph) {}
NodeIt& operator++() {
- digraph->next(*this);
+ _graph->next(*this);
return *this;
}
@@ -437,22 +437,22 @@ namespace lemon {
class ArcIt : public Arc {
- const Digraph* digraph;
+ const Graph* _graph;
public:
ArcIt() { }
ArcIt(Invalid i) : Arc(i) { }
- explicit ArcIt(const Digraph& _digraph) : digraph(&_digraph) {
- _digraph.first(static_cast<Arc&>(*this));
+ explicit ArcIt(const Graph& graph) : _graph(&graph) {
+ _graph->first(static_cast<Arc&>(*this));
}
- ArcIt(const Digraph& _digraph, const Arc& e) :
- Arc(e), digraph(&_digraph) { }
+ ArcIt(const Graph& graph, const Arc& arc) :
+ Arc(arc), _graph(&graph) { }
ArcIt& operator++() {
- digraph->next(*this);
+ _graph->next(*this);
return *this;
}
@@ -460,23 +460,23 @@ namespace lemon {
class OutArcIt : public Arc {
- const Digraph* digraph;
+ const Graph* _graph;
public:
OutArcIt() { }
OutArcIt(Invalid i) : Arc(i) { }
- OutArcIt(const Digraph& _digraph, const Node& node)
- : digraph(&_digraph) {
- _digraph.firstOut(*this, node);
+ OutArcIt(const Graph& graph, const Node& node)
+ : _graph(&graph) {
+ _graph->firstOut(*this, node);
}
- OutArcIt(const Digraph& _digraph, const Arc& arc)
- : Arc(arc), digraph(&_digraph) {}
+ OutArcIt(const Graph& graph, const Arc& arc)
+ : Arc(arc), _graph(&graph) {}
OutArcIt& operator++() {
- digraph->nextOut(*this);
+ _graph->nextOut(*this);
More information about the Lemon-commits
mailing list