delete[] _edge_lengths;
delete _graph;
deallocate_array<scalar_t>(detection_scores);
- deallocate_array<int>(allowed_motion);
+ deallocate_array<int>(allowed_motions);
deallocate_array<int>(exits);
deallocate_array<int>(entrances);
}
nb_time_steps = t;
detection_scores = allocate_array<scalar_t>(nb_time_steps, nb_locations);
- allowed_motion = allocate_array<int>(nb_locations, nb_locations);
+ allowed_motions = allocate_array<int>(nb_locations, nb_locations);
entrances = allocate_array<int>(nb_time_steps, nb_locations);
exits = allocate_array<int>(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;
}
}
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;
}
}
}
void MTPTracker::read(istream *is) {
- int l, t;
+ int l = 0, t = 0;
(*is) >> l >> t;
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];
}
}
nb_time_steps = 0;
detection_scores = 0;
- allowed_motion = 0;
+ allowed_motions = 0;
entrances = 0;
exits = 0;
delete[] _edge_lengths;
delete _graph;
deallocate_array<scalar_t>(detection_scores);
- deallocate_array<int>(allowed_motion);
+ deallocate_array<int>(allowed_motions);
deallocate_array<int>(entrances);
deallocate_array<int>(exits);
}
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++;
}
}
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;