aboutsummaryrefslogtreecommitdiff
path: root/mp.h
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-05-15 18:10:52 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2015-05-15 18:10:52 -0300
commit0b6df071d94ae8f7c9cdd3c96506a1420129e471 (patch)
treeea73a59457beba89ef6bab2b16d2d679d8dd1078 /mp.h
Initial commit. ForceScheme seems bugged.
Diffstat (limited to 'mp.h')
-rw-r--r--mp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/mp.h b/mp.h
new file mode 100644
index 0000000..b3f9c75
--- /dev/null
+++ b/mp.h
@@ -0,0 +1,11 @@
+#include <armadillo>
+
+namespace mp {
+
+static const double EPSILON = 1e-3;
+double euclidean(const arma::rowvec &x1, const arma::rowvec &x2);
+arma::mat dist(const arma::mat &X, double (*distCalc)(const arma::rowvec &, const arma::rowvec &) = euclidean);
+arma::mat lamp(const arma::mat &X, const arma::uvec &sampleIndices, const arma::mat &Ys);
+arma::mat forceScheme(const arma::mat &D, arma::mat &Y, size_t maxIter = 20, double tol = 1e-3, double fraction = 0.25);
+
+} // namespace mp