From 7caa97df0d3a4157380449fd2b984221d074b1b3 Mon Sep 17 00:00:00 2001 From: Andrea Vedaldi Date: Tue, 23 Jul 2013 12:40:42 +0200 Subject: [PATCH] kmeans.c: bugfix --- docsrc/install-octave.html | 2 +- vl/kmeans.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docsrc/install-octave.html b/docsrc/install-octave.html index d89fe6b4..a564bbb3 100644 --- a/docsrc/install-octave.html +++ b/docsrc/install-octave.html @@ -26,7 +26,7 @@

After the MEX files are successfully compiled (look for them into toolbox/mex/octave/), you can start using VLFeat in -Octave in the same way as +Octave in the same way as MATLAB. Do not forget to use the vl_setup command to initalize the paths:

diff --git a/vl/kmeans.c b/vl/kmeans.c index 732e32f0..dec17658 100644 --- a/vl/kmeans.c +++ b/vl/kmeans.c @@ -750,7 +750,7 @@ VL_XCAT(_vl_kmeans_quantize_ann_, SFX) vl_kdforestsearcher_query (searcher, &neighbor, 1, (TYPE const *) (data + x*self->dimension)); if (distances) { - if(update) { + if(!update) { distances[x] = (TYPE) neighbor.distance; assignments[x] = (vl_uint32) neighbor.index ; } else {