projects
/
mtp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
535b8ed
)
Cosmetics.
author
Francois Fleuret
<francois@fleuret.org>
Fri, 24 Aug 2012 02:14:54 +0000
(
04:14
+0200)
committer
Francois Fleuret
<francois@fleuret.org>
Fri, 24 Aug 2012 02:14:54 +0000
(
04:14
+0200)
mtp_graph.cc
patch
|
blob
|
history
diff --git
a/mtp_graph.cc
b/mtp_graph.cc
index
8160211
..
a60e532
100644
(file)
--- a/
mtp_graph.cc
+++ b/
mtp_graph.cc
@@
-33,7
+33,7
@@
public:
// These are the links in the origin_vertex leaving edge list
Edge *next_leaving_edge, *pred_leaving_edge;
// These are the links in the origin_vertex leaving edge list
Edge *next_leaving_edge, *pred_leaving_edge;
- inline void
re
vert();
+ inline void
in
vert();
};
class Vertex {
};
class Vertex {
@@
-52,7
+52,7
@@
public:
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
-void Edge::
re
vert() {
+void Edge::
in
vert() {
length = - length;
positivized_length = 0;
origin_vertex->del_edge(this);
length = - length;
positivized_length = 0;
origin_vertex->del_edge(this);
@@
-142,6
+142,7
@@
void MTPGraph::print(ostream *os) {
void MTPGraph::print_dot(ostream *os) {
(*os) << "digraph {" << endl;
// (*os) << " node [shape=circle];" << endl;
void MTPGraph::print_dot(ostream *os) {
(*os) << "digraph {" << endl;
// (*os) << " node [shape=circle];" << endl;
+ (*os) << " edge [color=gray]" << endl;
(*os) << " " << _source->id << " [peripheries=2];" << endl;
(*os) << " " << _sink->id << " [peripheries=2];" << endl;
for(int k = 0; k < _nb_edges; k++) {
(*os) << " " << _source->id << " [peripheries=2];" << endl;
(*os) << " " << _sink->id << " [peripheries=2];" << endl;
for(int k = 0; k < _nb_edges; k++) {
@@
-154,7
+155,7
@@
void MTPGraph::print_dot(ostream *os) {
<< " [style=bold,color=black,label=\"" << e->length << "\"];" << endl;
} else {
(*os) << " " << e->origin_vertex->id << " -> " << e->terminal_vertex->id
<< " [style=bold,color=black,label=\"" << e->length << "\"];" << endl;
} else {
(*os) << " " << e->origin_vertex->id << " -> " << e->terminal_vertex->id
- << " [
color=gray,
label=\"" << e->length << "\"];" << endl;
+ << " [label=\"" << e->length << "\"];" << endl;
}
}
(*os) << "}" << endl;
}
}
(*os) << "}" << endl;
@@
-300,7
+301,7
@@
void MTPGraph::find_best_paths(scalar_t *lengths) {
while(v->best_pred_edge_to_source) {
e = v->best_pred_edge_to_source;
v = e->origin_vertex;
while(v->best_pred_edge_to_source) {
e = v->best_pred_edge_to_source;
v = e->origin_vertex;
- e->
re
vert();
+ e->
in
vert();
// This is the only place where we change the occupations of
// edges
e->occupied = 1 - e->occupied;
// This is the only place where we change the occupations of
// edges
e->occupied = 1 - e->occupied;
@@
-312,7
+313,7
@@
void MTPGraph::find_best_paths(scalar_t *lengths) {
for(int k = 0; k < _nb_edges; k++) {
Edge *e = _edges + k;
for(int k = 0; k < _nb_edges; k++) {
Edge *e = _edges + k;
- if(e->occupied) { e->
re
vert(); }
+ if(e->occupied) { e->
in
vert(); }
}
}
}
}