summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-10-09 11:49:28 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-10-09 11:49:28 -0400
commitbe3434d70d4a83527d2fb756da1ee565aafda3f3 (patch)
treee50991d31635c12459ea0c7de6c87636e0510396
parent1d30b115d31df05530b20eb7dd348e21bc1a7711 (diff)
downloadc++-be3434d70d4a83527d2fb756da1ee565aafda3f3.tar.gz
c++-be3434d70d4a83527d2fb756da1ee565aafda3f3.tar.bz2
c++-be3434d70d4a83527d2fb756da1ee565aafda3f3.zip
added ising support to the new-style correlation analyzer
-rw-r--r--src/analyze_correlations.cpp9
1 files changed, 9 insertions, 0 deletions
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);