From: Francois Fleuret Date: Thu, 23 Aug 2012 03:59:21 +0000 (-0700) Subject: Cosmetics. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=e9fbecf1c13c63a717c1b359c24287dbce23d4ed;p=mtp.git Cosmetics. --- diff --git a/mtp.cc b/mtp.cc index 35b431b..105365d 100644 --- a/mtp.cc +++ b/mtp.cc @@ -48,10 +48,6 @@ int main(int argc, char **argv) { } tracker->build_graph(); - // { - // ofstream out("graph.dot"); - // tracker->print_dot_graph(&out); - // } for(int r = 0; r < 10; r++) { cout << "* ROUND " << r << endl; diff --git a/tracker.cc b/tracker.cc index 47460d3..ad68c28 100644 --- a/tracker.cc +++ b/tracker.cc @@ -68,7 +68,6 @@ void Tracker::set_detection_score(int time, int location, scalar_t score) { } void Tracker::build_graph() { - // Delete existing graph delete[] _edge_lengths; delete _graph; @@ -109,7 +108,6 @@ void Tracker::build_graph() { } // We put the other edges after - for(int l = 0; l < _nb_locations; l++) { node_from[e] = source; node_to[e] = 1 + l + 0 * _nb_locations; @@ -177,14 +175,16 @@ void Tracker::track() { _graph->find_best_paths(_edge_lengths); _graph->retrieve_disjoint_paths(); - // for(int p = 0; p < _graph->nb_paths; p++) { - // Path *path = _graph->paths[p]; - // cout << "PATH " << p << " [length " << path->length << "] " << path->nodes[0]; - // for(int n = 1; n < path->length; n++) { - // cout << " -> " << path->nodes[n]; - // } - // cout << endl; - // } +#ifdef VERBOSE + for(int p = 0; p < _graph->nb_paths; p++) { + Path *path = _graph->paths[p]; + cout << "PATH " << p << " [length " << path->length << "] " << path->nodes[0]; + for(int n = 1; n < path->length; n++) { + cout << " -> " << path->nodes[n]; + } + cout << endl; + } +#endif } int Tracker::nb_trajectories() {