From 0c677c5ef43d675e9b0bde6420fe04510416e158 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 11 Jul 2018 13:23:12 -0400 Subject: cleaned up conditional --- src/analyze_correlations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analyze_correlations.cpp b/src/analyze_correlations.cpp index 84ac8e0..9f72498 100644 --- a/src/analyze_correlations.cpp +++ b/src/analyze_correlations.cpp @@ -13,7 +13,7 @@ double *compute_OO(count_t length, T *data, count_t N) { for (count_t i = 0; i < N; i++) { OO[1] += data[i]; for (count_t j = 0; j < length; j++) { - if ((long int)N - (long int)i - (long int)j > 0) { + if (i + j < N) { OO[2 + j] += data[i] * data[i + j]; } } -- cgit v1.2.3-70-g09d2