X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=blobdiff_plain;f=mtp_graph.cc;h=a208403226a884832dd47fe5d28926ab8cbd6603;hb=df0839702923a2c5128b9374e01984dfb9f7791b;hp=7167cf6c7c3179d97eb1a2b378cd7bba2bc20dcc;hpb=14eafbcbbc5cb10464f39596b34eebce0a6922ed;p=mtp.git diff --git a/mtp_graph.cc b/mtp_graph.cc index 7167cf6..a208403 100644 --- a/mtp_graph.cc +++ b/mtp_graph.cc @@ -152,17 +152,19 @@ void MTPGraph::print(ostream *os) { void MTPGraph::print_dot(ostream *os) { (*os) << "digraph {" << endl; - (*os) << " node[shape=circle];" << endl; + // (*os) << " node [shape=circle];" << endl; + (*os) << " " << _source->id << " [peripheries=2];" << endl; + (*os) << " " << _sink->id << " [peripheries=2];" << endl; for(int k = 0; k < _nb_edges; k++) { Edge *e = _edges + k; // (*os) << " " << e->origin_vertex->id << " -> " << e->terminal_vertex->id // << ";" // << endl; if(e->occupied) { - (*os) << " " << e->origin_vertex->id << " -> " << e->terminal_vertex->id + (*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 + (*os) << " " << e->origin_vertex->id << " -> " << e->terminal_vertex->id << " [color=gray,label=\"" << e->length << "\"];" << endl; } }