projects
/
mtp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The methods MTPTracker::write_trajectories now writes first the number of trajectories.
[mtp.git]
/
mtp_tracker.cc
diff --git
a/mtp_tracker.cc
b/mtp_tracker.cc
index
af97ca5
..
825b4d1
100644
(file)
--- a/
mtp_tracker.cc
+++ b/
mtp_tracker.cc
@@
-132,6
+132,7
@@
void MTPTracker::read(istream *is) {
}
void MTPTracker::write_trajectories(ostream *os) {
}
void MTPTracker::write_trajectories(ostream *os) {
+ (*os) << nb_trajectories() << endl;
for(int t = 0; t < nb_trajectories(); t++) {
(*os) << t
<< " " << trajectory_entrance_time(t)
for(int t = 0; t < nb_trajectories(); t++) {
(*os) << t
<< " " << trajectory_entrance_time(t)
@@
-168,11
+169,11
@@
MTPTracker::~MTPTracker() {
}
int MTPTracker::early_pair_node(int t, int l) {
}
int MTPTracker::early_pair_node(int t, int l) {
- return 1 + (2 *
(t + 0)
+ 0) * _nb_locations + l;
+ return 1 + (2 *
t
+ 0) * _nb_locations + l;
}
int MTPTracker::late_pair_node(int t, int l) {
}
int MTPTracker::late_pair_node(int t, int l) {
- return 1 + (2 *
(t + 0)
+ 1) * _nb_locations + l;
+ return 1 + (2 *
t
+ 1) * _nb_locations + l;
}
void MTPTracker::build_graph() {
}
void MTPTracker::build_graph() {