X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=mtp.git;a=blobdiff_plain;f=mtp_tracker.cc;h=02541a6a27a821f57b29cef46eb20e3f720b0066;hp=b91a000ef3f84846d4c2967c7aea78056d61efe5;hb=32139a0f7307a4a4b209e43d44abbed6cdc00c89;hpb=5be711e6c321a85578d560891c915cf610e6e876 diff --git a/mtp_tracker.cc b/mtp_tracker.cc index b91a000..02541a6 100644 --- a/mtp_tracker.cc +++ b/mtp_tracker.cc @@ -32,7 +32,7 @@ void MTPTracker::free() { delete[] _edge_lengths; delete _graph; deallocate_array(detection_scores); - deallocate_array(allowed_motion); + deallocate_array(allowed_motions); deallocate_array(exits); deallocate_array(entrances); } @@ -44,14 +44,14 @@ void MTPTracker::allocate(int t, int l) { nb_time_steps = t; detection_scores = allocate_array(nb_time_steps, nb_locations); - allowed_motion = allocate_array(nb_locations, nb_locations); + allowed_motions = allocate_array(nb_locations, nb_locations); entrances = allocate_array(nb_time_steps, nb_locations); exits = allocate_array(nb_time_steps, nb_locations); for(int l = 0; l < nb_locations; l++) { for(int m = 0; m < nb_locations; m++) { - allowed_motion[l][m] = 0; + allowed_motions[l][m] = 0; } } @@ -74,7 +74,7 @@ void MTPTracker::write(ostream *os) { for(int l = 0; l < nb_locations; l++) { for(int m = 0; m < nb_locations; m++) { - (*os) << allowed_motion[l][m]; + (*os) << allowed_motions[l][m]; if(m < nb_locations - 1) (*os) << " "; else (*os) << endl; } } @@ -116,7 +116,7 @@ void MTPTracker::read(istream *is) { for(int l = 0; l < nb_locations; l++) { for(int m = 0; m < nb_locations; m++) { - (*is) >> allowed_motion[l][m]; + (*is) >> allowed_motions[l][m]; } } @@ -158,7 +158,7 @@ MTPTracker::MTPTracker() { nb_time_steps = 0; detection_scores = 0; - allowed_motion = 0; + allowed_motions = 0; entrances = 0; exits = 0; @@ -171,7 +171,7 @@ MTPTracker::~MTPTracker() { delete[] _edge_lengths; delete _graph; deallocate_array(detection_scores); - deallocate_array(allowed_motion); + deallocate_array(allowed_motions); deallocate_array(entrances); deallocate_array(exits); } @@ -197,7 +197,7 @@ void MTPTracker::build_graph() { if(entrances[t][l]) nb_entrances++; } for(int m = 0; m < nb_locations; m++) { - if(allowed_motion[l][m]) nb_motions++; + if(allowed_motions[l][m]) nb_motions++; } } @@ -237,7 +237,7 @@ void MTPTracker::build_graph() { for(int t = 0; t < nb_time_steps - 1; t++) { for(int l = 0; l < nb_locations; l++) { for(int k = 0; k < nb_locations; k++) { - if(allowed_motion[l][k]) { + if(allowed_motions[l][k]) { node_from[e] = late_pair_node(t, l); node_to[e] = early_pair_node(t+1, k); _edge_lengths[e] = 0.0;