56 for (d = 0; d <
dim; d++) {
58 dist = ANN_SUM(dist, ANN_POW(diff));
75 for (
int j = 0; j <
dim; j++) {
77 if (j < dim-1) out <<
" ";
113 for (
int i = 0; i <
dim; i++) p[i] = c;
121 for (
int i = 0; i < n; i++) {
143 for (
int i = 0; i <
dim; i++) p[i] = source[i];
150 for (
int i = 0; i <
dim; i++) {
151 dest.
lo[i] = source.
lo[i];
152 dest.
hi[i] = source.
hi[i];
159 for (
int i = 0; i <
dim; i++) {
160 if (p[i] < lo[i] || p[i] > hi[i])
return ANNfalse;
172 cerr <<
"ANN: ERROR------->" << msg <<
"<-------------ERROR\n";
176 cerr <<
"ANN: WARNING----->" << msg <<
"<-------------WARNING\n";
void annPrintPt(ANNpoint pt, int dim, std::ostream &out)
DLL_API void annDeallocPt(ANNpoint &p)
DLL_API void annDeallocPts(ANNpointArray &pa)
DLL_API ANNpoint annAllocPt(int dim, ANNcoord c=0)
DLL_API ANNdist annDist(int dim, ANNpoint p, ANNpoint q)
DLL_API ANNpoint annCopyPt(int dim, ANNpoint source)
DLL_API void annMaxPtsVisit(int maxPts)
DLL_API ANNpointArray annAllocPts(int n, int dim)
void annError(const char *msg, ANNerr level)
ANNbool inside(int dim, ANNpoint p)
void annAssignRect(int dim, ANNorthRect &dest, const ANNorthRect &source)