summaryrefslogtreecommitdiff
path: root/lib/orthogonal.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-02-28 20:33:41 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-02-28 20:33:41 -0500
commit1fbcb4dd4e52daeb53becba33827f8e48c5606b2 (patch)
tree6b8088fef6ca3e5f11551073b7793f6e9e767670 /lib/orthogonal.h
parente0d4943090c285a44dad501cf9dc24714f9b3530 (diff)
downloadc++-1fbcb4dd4e52daeb53becba33827f8e48c5606b2.tar.gz
c++-1fbcb4dd4e52daeb53becba33827f8e48c5606b2.tar.bz2
c++-1fbcb4dd4e52daeb53becba33827f8e48c5606b2.zip
fixed major mistake in process, also got n-component version fully working
Diffstat (limited to 'lib/orthogonal.h')
-rw-r--r--lib/orthogonal.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/orthogonal.h b/lib/orthogonal.h
new file mode 100644
index 0000000..a763b08
--- /dev/null
+++ b/lib/orthogonal.h
@@ -0,0 +1,24 @@
+
+#include <stdlib.h>
+#include <gsl/gsl_rng.h>
+#include <gsl/gsl_randist.h>
+#include <math.h>
+
+#include "types.h"
+
+void vector_replace(q_t n, double *v1, const double *v2);
+
+void vector_add(q_t n, double *v1, const double *v2);
+
+void vector_subtract(q_t n, double *v1, const double *v2);
+
+double *vector_rotate(q_t n, double *rot, double *vec);
+
+double *vector_rotate_inverse(q_t n, const double *rot, const double *vec);
+
+double vector_dot(q_t n, double *v1, double *v2);
+
+double *orthogonal_rotate(q_t n, double *m1, double *m2);
+
+double *gen_rot(gsl_rng *r, q_t n);
+