[vlfeat] 05/44: vlad.c: fixes doc

Dima Kogan dima at secretsauce.net
Wed Sep 16 21:05:27 UTC 2015


This is an automated email from the git hooks/post-receive script.

dkogan-guest pushed a commit to branch master
in repository vlfeat.

commit 8d1405893da412a148f804596f9f6d4265265f8e
Author: Andrea Vedaldi <vedaldi at gmail.com>
Date:   Thu Oct 2 15:05:53 2014 +0100

    vlad.c: fixes doc
---
 vl/vlad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vl/vlad.c b/vl/vlad.c
index 7f2e67a..8b6bd6a 100644
--- a/vl/vlad.c
+++ b/vl/vlad.c
@@ -71,7 +71,7 @@ vl_kmeans_quantize(kmeans,indexes,dataToEncode,numDataToEncode);
 assignments = vl_malloc(sizeof(float) * numDataToEncode * numCenters);
 memset(assignments, 0, sizeof(float) * numDataToEncode * numCenters);
 for(i = 0; i < numDataToEncode; i++) {
-  assignments[i + numCenters * indexes[i]] = 1.;
+  assignments[i * numCenters + indexes[i]] = 1.;
 }
 
 // allocate space for vlad encoding
@@ -280,7 +280,7 @@ VL_XCAT(_vl_vlad_encode_, SFX)
  ** @a dimension rows. @a data is the matrix of vectors to be encoded,
  ** with @a dimension rows and @a numData columns. @a assignments is a
  ** matrix with @a numClusters rows and @a numData columns.
- ** All the matrices should be stored in a row major order.
+ ** All the matrices should be stored in column-major order.
  **
  ** @a flag allows controlling further options:
  ** ::VL_VLAD_FLAG_NORMALIZE_COMPONENTS, ::VL_VLAD_FLAG_SQUARE_ROOT,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/vlfeat.git



More information about the debian-science-commits mailing list