summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);