aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-02-03 15:10:44 -0500
committerPaul Duncan <pabs@pablotron.org>2019-02-03 15:10:44 -0500
commitdf06fe6084b1c1673348050309a3a0cb99b6634f (patch)
treebb51c86aee01ca235f7c6feb5fb08808c307e2ed /util.h
parent68a4d7a514578f1360559c84ac08e3a1e2719826 (diff)
downloadkmeans-df06fe6084b1c1673348050309a3a0cb99b6634f.tar.bz2
kmeans-df06fe6084b1c1673348050309a3a0cb99b6634f.zip
add cluster support to gen-data.rb, show centroids on generated png
Diffstat (limited to 'util.h')
-rw-r--r--util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.h b/util.h
index d13dfae..eeda5a7 100644
--- a/util.h
+++ b/util.h
@@ -7,6 +7,12 @@
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define UNUSED(a) ((void) (a))
+#define D(...) do { \
+ fprintf(stderr, "DEBUG: %s(): ", __func__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fputs("\n", stderr); \
+} while (0)
+
#define die(...) do { \
fputs("FATAL: ", stderr); \
fprintf(stderr, __VA_ARGS__); \