Mercurial > hg > audiodb
changeset 299:b10ad7b6427f
fixed recently-introduced strict point ordering bug when LSH index is initially empty
author | mas01mc |
---|---|
date | Fri, 01 Aug 2008 15:45:10 +0000 |
parents | 3bb4d850557b |
children | f08c66ae8207 |
files | lshlib.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lshlib.cpp Fri Aug 01 15:33:00 2008 +0000 +++ b/lshlib.cpp Fri Aug 01 15:45:10 2008 +0000 @@ -446,7 +446,7 @@ Uns32T G::insert_point(vector<float>& v, Uns32T pp){ Uns32T collisionCount = 0; H::p = pp; - if(pp<=H::maxp) + if(H::maxp && pp<=H::maxp) error("points must be indexed in strict ascending order", "LSH::insert_point(vector<float>&, Uns32T pointID)"); H::maxp=pp; // Store highest pointID in database H::compute_hash_functions( v );