diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-03-23 09:17:03 -0300 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2025-03-23 09:17:03 -0300 |
commit | f3d34a2572426a4f149cc8b926d3b1102bb5a897 (patch) | |
tree | d0c8b3437cd3c584d030d38612623a62e74ea400 | |
parent | 505a6e7b376c290c81f99ba43cf5d19c9a98b421 (diff) | |
download | code-f3d34a2572426a4f149cc8b926d3b1102bb5a897.tar.gz code-f3d34a2572426a4f149cc8b926d3b1102bb5a897.tar.bz2 code-f3d34a2572426a4f149cc8b926d3b1102bb5a897.zip |
Write to file instead of std out
-rw-r--r-- | correlations.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/correlations.cpp b/correlations.cpp index 0d48844..930698a 100644 --- a/correlations.cpp +++ b/correlations.cpp @@ -60,6 +60,8 @@ int main(int argc, char* argv[]) { file.seekg((i0 + 1) * sizeof(float) * N); + std::ofstream outfile("correlations/" + filebase + "_" + std::to_string(T0) + ".dat"); + for (Real t = 0; t <= T; t += Δw) { if (file.peek() == EOF) { break; @@ -68,7 +70,7 @@ int main(int argc, char* argv[]) { Vector x(N); file.read(reinterpret_cast<char*>(x.data()), N * sizeof(float)); - std::cout << t << "\t" << x0.dot(x) / N << std::endl; + outfile << t << "\t" << x0.dot(x) / N << std::endl; } |