#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 " << p << " [length " << path->nb_nodes << "] " << path->nodes[0];
+ for(int n = 1; n < path->nb_nodes; n++) {
cout << " -> " << path->nodes[n];
}
cout << endl;
return _graph->nb_paths;
}
+scalar_t Tracker::trajectory_score(int k) {
+ return -_graph->paths[k]->length;
+}
+
int Tracker::trajectory_entrance_time(int k) {
return (_graph->paths[k]->nodes[1] - 1) / (2 * _nb_locations);
}
int Tracker::trajectory_duration(int k) {
- return (_graph->paths[k]->length - 2) / 2;
+ return (_graph->paths[k]->nb_nodes - 2) / 2;
}
-int Tracker::trajectory_location(int k, int time) {
- return (_graph->paths[k]->nodes[2 * time + 1] - 1) % _nb_locations;
+int Tracker::trajectory_location(int k, int time_from_entry) {
+ return (_graph->paths[k]->nodes[2 * time_from_entry + 1] - 1) % _nb_locations;
}