summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-11 13:23:12 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-11 13:23:12 -0400
commit0c677c5ef43d675e9b0bde6420fe04510416e158 (patch)
treeae553a7a20e21132eb75253e22a15783abf2f17c
parent6d2f6ccc9237186331d431e0329cc0e9a72eb5fc (diff)
downloadc++-0c677c5ef43d675e9b0bde6420fe04510416e158.tar.gz
c++-0c677c5ef43d675e9b0bde6420fe04510416e158.tar.bz2
c++-0c677c5ef43d675e9b0bde6420fe04510416e158.zip
cleaned up conditional
-rw-r--r--src/analyze_correlations.cpp2
1 files changed, 1 insertions, 1 deletions
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];
}
}