// These are the links in the origin_vertex leaving edge list
Edge *next_leaving_edge, *pred_leaving_edge;
- inline void revert();
+ inline void invert();
};
class Vertex {
//////////////////////////////////////////////////////////////////////
-void Edge::revert() {
+void Edge::invert() {
length = - length;
positivized_length = 0;
origin_vertex->del_edge(this);
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++) {
<< " [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;
while(v->best_pred_edge_to_source) {
e = v->best_pred_edge_to_source;
v = e->origin_vertex;
- e->revert();
+ e->invert();
// This is the only place where we change the occupations of
// edges
e->occupied = 1 - e->occupied;
for(int k = 0; k < _nb_edges; k++) {
Edge *e = _edges + k;
- if(e->occupied) { e->revert(); }
+ if(e->occupied) { e->invert(); }
}
}