summaryrefslogtreecommitdiffstats
path: root/src/armadillo-test.cpp
diff options
context:
space:
mode:
authorChristian Frisson <christian.frisson@gmail.com>2012-09-09 15:01:46 (GMT)
committerChristian Frisson <christian.frisson@gmail.com>2012-09-09 15:01:46 (GMT)
commit9920490a34d324a8075f0101b1e029bb84b15b7b (patch)
tree2f36dbd1ee9cf637af3046e597c31ddaafcd264c /src/armadillo-test.cpp
parentdd54b69d76820de034501a211d44aa5c1ab7c973 (diff)
downloadmxe-9920490a34d324a8075f0101b1e029bb84b15b7b.zip
mxe-9920490a34d324a8075f0101b1e029bb84b15b7b.tar.gz
mxe-9920490a34d324a8075f0101b1e029bb84b15b7b.tar.bz2
added armadillo 3.4.0 with test
Diffstat (limited to 'src/armadillo-test.cpp')
-rw-r--r--src/armadillo-test.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/armadillo-test.cpp b/src/armadillo-test.cpp
new file mode 100644
index 0000000..da32512
--- /dev/null
+++ b/src/armadillo-test.cpp
@@ -0,0 +1,24 @@
+/*
+ * This file is part of MXE.
+ * See index.html for further information.
+ */
+
+#include <armadillo>
+
+using namespace arma;
+
+int main()
+{
+ mat A = randu<mat>(50,50);
+ mat B = trans(A)*A; // generate a symmetric matrix
+
+ vec eigval;
+ mat eigvec;
+
+ // use standard algorithm by default
+ eig_sym(eigval, eigvec, B);
+
+ // use divide & conquer algorithm
+ eig_sym(eigval, eigvec, B, "dc");
+ return 0;
+}