aboutsummaryrefslogtreecommitdiff
path: root/npdistortion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'npdistortion.cpp')
-rw-r--r--npdistortion.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/npdistortion.cpp b/npdistortion.cpp
new file mode 100644
index 0000000..1994c74
--- /dev/null
+++ b/npdistortion.cpp
@@ -0,0 +1,13 @@
+#include "npdistortion.h"
+
+#include "mp.h"
+
+NPDistortion::NPDistortion(int k)
+ : m_k(k)
+{
+}
+
+arma::vec NPDistortion::measure(const arma::mat &distA, const arma::mat &distB)
+{
+ return mp::neighborhoodPreservation(distA, distB, m_k);
+}