From 1ccf3759c554fd2d07e269f8e08a21c38c1406f3 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 13 May 2020 01:20:51 +0200 Subject: [PATCH] ex-6: fix EMD typo --- ex-6/dist.c | 2 +- ex-6/dist.h | 2 +- ex-6/plots/{edm-round.py => emd-round.py} | 4 ++-- ex-6/plots/{edm-round.txt => emd-round.txt} | 0 ex-6/test.c | 4 ++-- .../{edm-hist-0.005.pdf => emd-hist-0.005.pdf} | Bin .../images/{edm-hist-0.01.pdf => emd-hist-0.01.pdf} | Bin .../images/{edm-hist-0.05.pdf => emd-hist-0.05.pdf} | Bin notes/images/{edm-hist-0.pdf => emd-hist-0.pdf} | Bin 9 files changed, 6 insertions(+), 6 deletions(-) rename ex-6/plots/{edm-round.py => emd-round.py} (91%) rename ex-6/plots/{edm-round.txt => emd-round.txt} (100%) rename notes/images/{edm-hist-0.005.pdf => emd-hist-0.005.pdf} (100%) rename notes/images/{edm-hist-0.01.pdf => emd-hist-0.01.pdf} (100%) rename notes/images/{edm-hist-0.05.pdf => emd-hist-0.05.pdf} (100%) rename notes/images/{edm-hist-0.pdf => emd-hist-0.pdf} (100%) diff --git a/ex-6/dist.c b/ex-6/dist.c index 6eaab78..3fde855 100644 --- a/ex-6/dist.c +++ b/ex-6/dist.c @@ -10,7 +10,7 @@ * equally sized this can be futher simplified to give a simple * O(n) solution. */ -double edm_between(gsl_histogram *a, gsl_histogram *b) { +double emd_between(gsl_histogram *a, gsl_histogram *b) { /* For the distance to make sense the * histograms must have the same area. */ diff --git a/ex-6/dist.h b/ex-6/dist.h index 9212d24..9b62407 100644 --- a/ex-6/dist.h +++ b/ex-6/dist.h @@ -11,7 +11,7 @@ * equally sized this can be futher simplified to give a simple * O(n) solution. */ -double edm_between(gsl_histogram *a, gsl_histogram *b); +double emd_between(gsl_histogram *a, gsl_histogram *b); /* Normalise a histogram: ie rescaling the bin diff --git a/ex-6/plots/edm-round.py b/ex-6/plots/emd-round.py similarity index 91% rename from ex-6/plots/edm-round.py rename to ex-6/plots/emd-round.py index 47c9835..8db7084 100644 --- a/ex-6/plots/edm-round.py +++ b/ex-6/plots/emd-round.py @@ -9,7 +9,7 @@ def plot(table, title='', log=False): plt.subplot(211) if log: plt.xscale('log') - plt.title('EDM distance' + ' '*10, loc='right') + plt.title('EMD distance' + ' '*10, loc='right') plt.plot(table[0], table[1], color='#92182b') plt.tick_params(axis='y', labelcolor='#92182b') @@ -31,7 +31,7 @@ def plot(table, title='', log=False): plt.rcParams['font.size'] = 12 -table = np.loadtxt('ex-6/plots/edm-round.txt') +table = np.loadtxt('ex-6/plots/emd-round.txt') plot(table[:27].T, title='noiseless', log=True) plot(table[27:47].T, title=r'$\sigma=0.005$') diff --git a/ex-6/plots/edm-round.txt b/ex-6/plots/emd-round.txt similarity index 100% rename from ex-6/plots/edm-round.txt rename to ex-6/plots/emd-round.txt diff --git a/ex-6/test.c b/ex-6/test.c index a7c5615..847d5bb 100644 --- a/ex-6/test.c +++ b/ex-6/test.c @@ -104,8 +104,8 @@ pair_t experiment( * distance histogram. */ pair_t dist; - dist.a = edm_between(hist, fft_clean); - dist.b = edm_between(hist, rl_clean); + dist.a = emd_between(hist, fft_clean); + dist.b = emd_between(hist, rl_clean); // free memory gsl_histogram_free(hist); diff --git a/notes/images/edm-hist-0.005.pdf b/notes/images/emd-hist-0.005.pdf similarity index 100% rename from notes/images/edm-hist-0.005.pdf rename to notes/images/emd-hist-0.005.pdf diff --git a/notes/images/edm-hist-0.01.pdf b/notes/images/emd-hist-0.01.pdf similarity index 100% rename from notes/images/edm-hist-0.01.pdf rename to notes/images/emd-hist-0.01.pdf diff --git a/notes/images/edm-hist-0.05.pdf b/notes/images/emd-hist-0.05.pdf similarity index 100% rename from notes/images/edm-hist-0.05.pdf rename to notes/images/emd-hist-0.05.pdf diff --git a/notes/images/edm-hist-0.pdf b/notes/images/emd-hist-0.pdf similarity index 100% rename from notes/images/edm-hist-0.pdf rename to notes/images/emd-hist-0.pdf