summaryrefslogtreecommitdiff
path: root/lib/vector.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 16:18:40 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 16:18:40 -0400
commit1160baa61bad605cf8a1d583e8ae356a54a942df (patch)
treee7c865f38836a9a03349bbd803aae8be9b37a200 /lib/vector.h
parent870555f569bc63fecdc7c0b16e72e4e002f21c13 (diff)
downloadc++-1160baa61bad605cf8a1d583e8ae356a54a942df.tar.gz
c++-1160baa61bad605cf8a1d583e8ae356a54a942df.tar.bz2
c++-1160baa61bad605cf8a1d583e8ae356a54a942df.zip
many changes, including new spin spaces and groups and cleaning up core library code
Diffstat (limited to 'lib/vector.h')
-rw-r--r--lib/vector.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vector.h b/lib/vector.h
index beee1a7..2f4077a 100644
--- a/lib/vector.h
+++ b/lib/vector.h
@@ -109,7 +109,7 @@ void write_magnetization(vector_t <q, double> M, FILE *outfile) {
}
template <q_t q, class T>
-T dot(vector_t <q, T> v1, vector_t <q, T> v2) {
+T dot(const vector_t <q, T>& v1, const vector_t <q, T>& v2) {
T prod = 0;
for (q_t i = 0; i < q; i++) {
@@ -120,7 +120,7 @@ T dot(vector_t <q, T> v1, vector_t <q, T> v2) {
}
template <q_t q, class T>
-double H_vector(vector_t <q, T> v1, T *H) {
+double H_vector(const vector_t <q, T>& v1, T *H) {
vector_t <q, T> H_vec(H);
return (double)(dot <q, T> (v1, H_vec));
}