From be3434d70d4a83527d2fb756da1ee565aafda3f3 Mon Sep 17 00:00:00 2001
From: Jaron Kent-Dobias <jaron@kent-dobias.com>
Date: Tue, 9 Oct 2018 11:49:28 -0400
Subject: added ising support to the new-style correlation analyzer

---
 src/analyze_correlations.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'src')

diff --git a/src/analyze_correlations.cpp b/src/analyze_correlations.cpp
index 4911008..32887d7 100644
--- a/src/analyze_correlations.cpp
+++ b/src/analyze_correlations.cpp
@@ -432,6 +432,15 @@ int main (int argc, char *argv[]) {
               forward_data[i] = sqrt(pow(data_M[3 * drop + 3 * i], 2) + pow(data_M[3 * drop + 3 * i + 1], 2) + pow(data_M[3 * drop + 3 * i + 2], 2));
             }
             free(data_M);
+          } else if (0 == strcmp(model, "ISING")) {
+            float *data_M = (int *)malloc(N * sizeof(float));
+            fread(data_M, sizeof(int), N, file_M);
+            fclose(file_M);
+            for (int i = 0; i < M; i++) {
+              forward_data[i] = (double)data_M[i];
+            }
+            free(data_M);
+          }
           } else {
             printf("UNKNOWN MODEL\n");
             exit(EXIT_FAILURE);
-- 
cgit v1.2.3-70-g09d2