77 #define DLL_API __declspec(dllexport)
79 #define DLL_API __declspec(dllimport)
112 #ifdef ANN_NO_LIMITS_H // limits.h unavailable
114 const double ANN_DBL_MAX = MAXDOUBLE;
118 const double ANN_DBL_MAX = DBL_MAX;
121 #define ANNversion "1.1.2" // ANN version and information
122 #define ANNversionCmt ""
123 #define ANNcopyright "David M. Mount and Sunil Arya"
124 #define ANNlatestRev "Jan 27, 2010"
132 enum ANNbool {ANNfalse = 0, ANNtrue = 1};
158 typedef double ANNcoord;
159 typedef double ANNdist;
176 const ANNidx ANN_NULL_IDX = -1;
199 const ANNdist ANN_DIST_INF = ANN_DBL_MAX;
219 #ifdef DBL_DIG // number of sig. bits in ANNcoord
220 const int ANNcoordPrec = DBL_DIG;
222 const int ANNcoordPrec = 15;
235 const ANNbool ANN_ALLOW_SELF_MATCH = ANNtrue;
336 #define ANN_POW(v) ((v)*(v))
337 #define ANN_ROOT(x) sqrt(x)
338 #define ANN_SUM(x,y) ((x) + (y))
339 #define ANN_DIFF(x,y) ((y) - (x))
375 typedef ANNcoord* ANNpoint;
376 typedef ANNpoint* ANNpointArray;
377 typedef ANNdist* ANNdistArray;
378 typedef ANNidx* ANNidxArray;
417 DLL_API ANNdist annDist(
422 DLL_API ANNpoint annAllocPt(
426 DLL_API ANNpointArray annAllocPts(
430 DLL_API
void annDeallocPt(
433 DLL_API
void annDeallocPts(
436 DLL_API ANNpoint annCopyPt(
495 virtual void annkSearch(
503 virtual int annkFRSearch(
507 ANNidxArray nn_idx = NULL,
508 ANNdistArray dd = NULL,
512 virtual int theDim() = 0;
513 virtual int nPoints() = 0;
515 virtual ANNpointArray thePoints() = 0;
561 ANNidxArray nn_idx = NULL,
562 ANNdistArray dd = NULL,
571 ANNpointArray thePoints()
603 const int ANN_N_SPLIT_RULES = 6;
610 const int ANN_N_SHRINK_RULES = 4;
720 ANNpointArray pa = NULL,
721 ANNidxArray pi = NULL);
734 ANNsplitRule split = ANN_KD_SUGGEST);
759 ANNidxArray nn_idx = NULL,
760 ANNdistArray dd = NULL,
769 ANNpointArray thePoints()
780 virtual void getStats(
810 ANNsplitRule split = ANN_KD_SUGGEST,
811 ANNshrinkRule shrink = ANN_BD_SUGGEST);
825 DLL_API
void annMaxPtsVisit(
828 DLL_API
void annClose();