From 1810103bc9ac4c9a8d432d113f5ca6eae6560fb4 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 10 Jul 2018 11:17:03 -0400 Subject: minor reorganizing --- lib/orthogonal.h | 13 ------------- lib/vector.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/orthogonal.h b/lib/orthogonal.h index 2d0e1a1..85f7a20 100644 --- a/lib/orthogonal.h +++ b/lib/orthogonal.h @@ -161,16 +161,3 @@ void generate_rotation (gsl_rng *r, orthogonal_t *ptr) { } } -template -void write_magnetization(vector_t M, FILE *outfile) { - fwrite(M.x, sizeof(double), q, outfile); -} - -template // save some space and don't write whole doubles -void write_magnetization(vector_t M, FILE *outfile) { - for (q_t i = 0; i < q; i++) { - float M_tmp = (float)M.x[i]; - fwrite(&M_tmp, sizeof(float), 1, outfile); - } -} - diff --git a/lib/vector.h b/lib/vector.h index c7f459c..62ce59e 100644 --- a/lib/vector.h +++ b/lib/vector.h @@ -70,3 +70,16 @@ void free_spin (vector_t v) { free(v.x); } +template +void write_magnetization(vector_t M, FILE *outfile) { + fwrite(M.x, sizeof(double), q, outfile); +} + +template // save some space and don't write whole doubles +void write_magnetization(vector_t M, FILE *outfile) { + for (q_t i = 0; i < q; i++) { + float M_tmp = (float)M.x[i]; + fwrite(&M_tmp, sizeof(float), 1, outfile); + } +} + -- cgit v1.2.3-70-g09d2