- detection_scores = allocate_array<scalar_t>(_nb_time_steps, _nb_locations);
- allowed_motion = allocate_array<int>(_nb_locations, _nb_locations);
+ detection_scores = allocate_array<scalar_t>(nb_time_steps, nb_locations);
+ allowed_motion = allocate_array<int>(nb_locations, nb_locations);
// The edges from the source to the entrances and from the exits
// to the sink (in every time frames but the first for the
// entrances, and last for the exits)
// The edges from the source to the entrances and from the exits
// to the sink (in every time frames but the first for the
// entrances, and last for the exits)
node_from[e] = early_pair_node(t, l);
node_to[e] = late_pair_node(t, l);
e++;
node_from[e] = early_pair_node(t, l);
node_to[e] = late_pair_node(t, l);
e++;
- for(int l = 0; l < _nb_locations; l++) {
- node_from[e] = late_pair_node(_nb_time_steps - 1, l);
+ for(int l = 0; l < nb_locations; l++) {
+ node_from[e] = late_pair_node(nb_time_steps - 1, l);
- 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++) {
+ 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]) {
node_from[e] = late_pair_node(t, l);
node_to[e] = early_pair_node(t+1, k);
if(allowed_motion[l][k]) {
node_from[e] = late_pair_node(t, l);
node_to[e] = early_pair_node(t+1, k);
if(t > 0 && entrances[l]) {
node_from[e] = source;
node_to[e] = early_pair_node(t, l);
_edge_lengths[e] = 0.0;
e++;
}
if(t > 0 && entrances[l]) {
node_from[e] = source;
node_to[e] = early_pair_node(t, l);
_edge_lengths[e] = 0.0;
e++;
}