summaryrefslogtreecommitdiff
path: root/ot/lp/EMD.h
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2016-10-27 12:34:42 +0200
committerRémi Flamary <remi.flamary@gmail.com>2016-10-27 12:34:42 +0200
commite083f90ad09a3bd42beffea1e996f3b4a9b3ff76 (patch)
treef329e51af871ef1f415a87d4f9820c50c03fc4fc /ot/lp/EMD.h
parent708aadb3396129c56cf128be04b7e87304b95070 (diff)
rename emd module to lp
Diffstat (limited to 'ot/lp/EMD.h')
-rw-r--r--ot/lp/EMD.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/ot/lp/EMD.h b/ot/lp/EMD.h
new file mode 100644
index 0000000..40d7192
--- /dev/null
+++ b/ot/lp/EMD.h
@@ -0,0 +1,29 @@
+/* This file is a c++ wrapper function for computing the transportation cost
+ * between two vectors given a cost matrix.
+ *
+ * It was written by Antoine Rolet (2014) and mainly consists of a wrapper
+ * of the code written by Nicolas Bonneel available on this page
+ * http://people.seas.harvard.edu/~nbonneel/FastTransport/
+ *
+ * It was then modified to make it more amenable to python inline calling
+ *
+ * Please give relevant credit to the original author (Nicolas Bonneel) if
+ * you use this code for a publication.
+ *
+ */
+
+
+#ifndef EMD_H
+#define EMD_H
+
+#include <iostream>
+#include <vector>
+#include "network_simplex_simple.h"
+
+using namespace lemon;
+typedef unsigned int node_id_type;
+
+
+void EMD_wrap(int n1,int n2, double *X, double *Y,double *D, double *G, double *cost);
+
+#endif