From 6be91ad771b06e5dd79ac5e1b899468235aafaa2 Mon Sep 17 00:00:00 2001 From: jiri Date: Wed, 7 Sep 2005 20:40:54 +0000 Subject: [PATCH] *** empty log message *** --- bisection.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bisection.h b/bisection.h index acb31f6..a2a44df 100644 --- a/bisection.h +++ b/bisection.h @@ -1,6 +1,6 @@ #ifndef _BISECTION_H #define _BISECTION_H -//general bisection search +//general bisection search between dm and hm //returns dm-1 on failure, otherwise number between dm and hm //cmp returns 0 on equal, >0 if first > second argument @@ -39,15 +39,15 @@ int interpolation_find(INDEX dm0, INDEX high, const SUBJECT *x, const SUBJECT *b { d1=(*dist)(x,base+low*lead_dimension_base); d2=(*dist)(base+high*lead_dimension_base,x); - cout << "intlp "<=0) break; + cout << "intlp "<high) laerror("interpolation_find: error in distance function"); d4=(*dist)(x,base+mid*lead_dimension_base); - cout << "intlp2 "<0) low = mid + 1; - else if(d3<0) + else if(d4<0) high = mid - 1; else return mid;