$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
mtp: \
- mtp_graph.o \
+ path.o mtp_graph.o \
tracker.o \
mtp.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
-////////////////////////////////////////////////////////////////////
-// START_IP_HEADER //
-// //
-// Written by Francois Fleuret //
-// Contact <francois.fleuret@idiap.ch> for comments & bug reports //
-// //
-// END_IP_HEADER //
-////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////
+// This program is free software: you can redistribute it and/or modify //
+// it under the terms of the version 3 of the GNU General Public License //
+// as published by the Free Software Foundation. //
+// //
+// This program is distributed in the hope that it will be useful, but //
+// WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
+// General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program. If not, see <http://www.gnu.org/licenses/>. //
+// //
+// Written by and Copyright (C) Francois Fleuret //
+// Contact <francois.fleuret@idiap.ch> for comments & bug reports //
+///////////////////////////////////////////////////////////////////////////
#ifndef MISC_H
#define MISC_H
//////////////////////////////////////////////////////////////////////
-Path::Path(int l) {
- length = l;
- nodes = new int[length];
-}
-
-Path::~Path() {
- delete[] nodes;
-}
-
-//////////////////////////////////////////////////////////////////////
-
MTPGraph::MTPGraph(int nb_vertices, int nb_edges,
int *from, int *to,
int source, int sink) {
using namespace std;
#include "misc.h"
+#include "path.h"
class Vertex;
class Edge;
-class Path {
-public:
- Path(int l);
- ~Path();
- int length;
- int *nodes;
-};
-
class MTPGraph {
void initialize_positivized_lengths_with_min();
void update_positivized_lengths();
public:
+ // These variables are filled when retrieve_disjoint_paths is called
int nb_paths;
Path **paths;
--- /dev/null
+
+///////////////////////////////////////////////////////////////////////////
+// This program is free software: you can redistribute it and/or modify //
+// it under the terms of the version 3 of the GNU General Public License //
+// as published by the Free Software Foundation. //
+// //
+// This program is distributed in the hope that it will be useful, but //
+// WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
+// General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program. If not, see <http://www.gnu.org/licenses/>. //
+// //
+// Written by and Copyright (C) Francois Fleuret //
+// Contact <francois.fleuret@idiap.ch> for comments & bug reports //
+///////////////////////////////////////////////////////////////////////////
+
+#include "path.h"
+
+//////////////////////////////////////////////////////////////////////
+
+Path::Path(int l) {
+ length = l;
+ nodes = new int[length];
+}
+
+Path::~Path() {
+ delete[] nodes;
+}
--- /dev/null
+
+///////////////////////////////////////////////////////////////////////////
+// This program is free software: you can redistribute it and/or modify //
+// it under the terms of the version 3 of the GNU General Public License //
+// as published by the Free Software Foundation. //
+// //
+// This program is distributed in the hope that it will be useful, but //
+// WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
+// General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program. If not, see <http://www.gnu.org/licenses/>. //
+// //
+// Written by and Copyright (C) Francois Fleuret //
+// Contact <francois.fleuret@idiap.ch> for comments & bug reports //
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef PATH_H
+#define PATH_H
+
+class Path {
+public:
+ Path(int l);
+ ~Path();
+ int length;
+ int *nodes;
+};
+
+#endif
Tracker(int nb_time_steps, int nb_locations);
~Tracker();
+ // Define the spatial topology
+
void set_allowed_motion(int from_location, int to_location, int v);
void set_as_entrance(int location, int v);
void set_as_exit(int location, int v);
+ // Build or print the graph needed for the tracking per se
+
void build_graph();
void print_graph_dot(ostream *os);
+ // Define the detection scores
+
void set_detection_score(int time, int location, scalar_t score);
+ // Compute the optimal set of trajectories
+
void track();
+ // Read-out of the optimal trajectories
+
int nb_trajectories();
int trajectory_entrance_time(int k);
int trajectory_duration(int k);