From 5f1eb9a12821e7462b7b2853e0d95c8c863bf900 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Thu, 26 Jul 2018 16:55:17 -0400 Subject: now using const passing of object reference instead of pointers --- lib/correlation.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/correlation.h') diff --git a/lib/correlation.h b/lib/correlation.h index 49c6ff2..23b1bd9 100644 --- a/lib/correlation.h +++ b/lib/correlation.h @@ -7,13 +7,13 @@ #include template -double correlation_length(const state_t *s) { +double correlation_length(const state_t & s) { double total = 0; - for (D_t j = 0; j < s->D; j++) { - total += norm_squared(s->ReF[j]) + norm_squared(s->ReF[j]); + for (D_t j = 0; j < s.D; j++) { + total += norm_squared(s.ReF[j]) + norm_squared(s.ReF[j]); } - return total / s->D; + return total / s.D; } -- cgit v1.2.3-70-g09d2