tAdd function to print three arrays in stdout - cngf-pf - continuum model for g… | |
git clone git://src.adamsgaard.dk/cngf-pf | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit be5a38658a041750de71b977e28948a03f5cc510 | |
parent 14433f9af4cfd0c84b70662369a037221a4fec26 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 15 Apr 2019 08:02:39 +0200 | |
Add function to print three arrays in stdout | |
Diffstat: | |
M arrays.c | 10 ++++++++++ | |
M arrays.h | 5 +++++ | |
2 files changed, 15 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/arrays.c b/arrays.c | |
t@@ -116,6 +116,16 @@ void print_arrays_2nd_normalized(const double* a, const d… | |
printf("%.17g\t%.17g\n", a[i], b[i]/max_b); | |
} | |
+void print_three_arrays( | |
+ const double* a, | |
+ const double* b, | |
+ const double* c, | |
+ const int n) | |
+{ | |
+ for (int i=0; i<n; ++i) | |
+ printf("%.17g\t%.17g\t%.17g\n", a[i], b[i], c[i]); | |
+} | |
+ | |
void copy_values(const double* in, double* out, const int n) | |
{ | |
for (int i=0; i<n; ++i) | |
diff --git a/arrays.h b/arrays.h | |
t@@ -28,6 +28,11 @@ double min(const double* a, const int n); | |
void print_array(const double* a, const int n); | |
void print_arrays(const double* a, const double* b, const int n); | |
void print_arrays_2nd_normalized(const double* a, const double* b, const int n… | |
+void print_three_arrays( | |
+ const double* a, | |
+ const double* b, | |
+ const double* c, | |
+ const int n); | |
void copy_values(const double* in, double* out, const int n); | |