changeset 62:9379253c3f78

Fix tests/0004 by initializing the distance vector for point queries with -DBL_MAX rather than 0.0.
author mas01cr
date Thu, 20 Sep 2007 14:29:30 +0000
parents 3f6586c589d5
children cee75159c0bc
files audioDB.cpp audioDB.h
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.cpp	Thu Sep 20 14:29:03 2007 +0000
+++ b/audioDB.cpp	Thu Sep 20 14:29:30 2007 +0000
@@ -1050,7 +1050,7 @@
   unsigned qIndexes[pointNN];
   unsigned sIndexes[pointNN];
   for(unsigned k=0; k<pointNN; k++){
-    distances[k]=0.0;
+    distances[k]=-DBL_MAX;
     qIndexes[k]=~0;
     sIndexes[k]=~0;    
   }
--- a/audioDB.h	Thu Sep 20 14:29:03 2007 +0000
+++ b/audioDB.h	Thu Sep 20 14:29:30 2007 +0000
@@ -82,6 +82,7 @@
 #include <math.h>
 #include <sys/time.h>
 #include <assert.h>
+#include <float.h>
 
 // includes for web services
 #include "soapH.h"