comparison lshlib.cpp @ 520:0767731a6cce multiprobeLSH

Fixed boundary {-1,+1} order, array syntax in generate_multiprobe_keys(), boundary error in MultiProbe::valid()
author mas01mc
date Mon, 26 Jan 2009 13:19:09 +0000
parents fdcd436d7cbd
children 237d5a03d317
comparison
equal deleted inserted replaced
519:fdcd436d7cbd 520:0767731a6cce
341 341
342 // make hash value by purturbating the given hash functions 342 // make hash value by purturbating the given hash functions
343 // according the the boundary distances of the current query 343 // according the the boundary distances of the current query
344 void H::generate_multiprobe_keys(Uns32T*g, Uns32T* r1, Uns32T* r2){ 344 void H::generate_multiprobe_keys(Uns32T*g, Uns32T* r1, Uns32T* r2){
345 assert(!multiProbePtr->empty()); // Test this for now, until all is stable 345 assert(!multiProbePtr->empty()); // Test this for now, until all is stable
346 Uns32T* mpg = new Uns32T(H::k); // temporary array storage 346 Uns32T* mpg = new Uns32T[H::k]; // temporary array storage
347 347
348 // Copy the hash bucket identifiers 348 // Copy the hash bucket identifiers
349 Uns32T* mpgPtr = mpg; 349 Uns32T* mpgPtr = mpg;
350 Uns32T kk = H::k; 350 Uns32T kk = H::k;
351 while(kk--) 351 while(kk--)