-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove platform restrictions, fix build on SunOS.
- Loading branch information
fhajny
committed
Sep 30, 2014
1 parent
3db8296
commit 5a59821
Showing
4 changed files
with
70 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
$NetBSD$ | ||
|
||
Rename reserved symbol. | ||
--- src/kd_split.cpp.orig 2010-01-28 04:40:01.000000000 +0000 | ||
+++ src/kd_split.cpp | ||
@@ -31,7 +31,7 @@ | ||
// Constants | ||
//---------------------------------------------------------------------- | ||
|
||
-const double ERR = 0.001; // a small value | ||
+const double ANN_ERR = 0.001; // a small value | ||
const double FS_ASPECT_RATIO = 3.0; // maximum allowed aspect ratio | ||
// in fair split. Must be >= 2. | ||
|
||
@@ -95,7 +95,7 @@ void midpt_split( | ||
ANNcoord max_spread = -1; // find long side with most spread | ||
for (d = 0; d < dim; d++) { | ||
// is it among longest? | ||
- if (double(bnds.hi[d] - bnds.lo[d]) >= (1-ERR)*max_length) { | ||
+ if (double(bnds.hi[d] - bnds.lo[d]) >= (1-ANN_ERR)*max_length) { | ||
// compute its spread | ||
ANNcoord spr = annSpread(pa, pidx, n, d); | ||
if (spr > max_spread) { // is it max so far? | ||
@@ -165,7 +165,7 @@ void sl_midpt_split( | ||
ANNcoord max_spread = -1; // find long side with most spread | ||
for (d = 0; d < dim; d++) { | ||
// is it among longest? | ||
- if ((bnds.hi[d] - bnds.lo[d]) >= (1-ERR)*max_length) { | ||
+ if ((bnds.hi[d] - bnds.lo[d]) >= (1-ANN_ERR)*max_length) { | ||
// compute its spread | ||
ANNcoord spr = annSpread(pa, pidx, n, d); | ||
if (spr > max_spread) { // is it max so far? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
$NetBSD$ | ||
|
||
Rename reserved symbol. | ||
--- test/ann_test.cpp.orig 2010-01-28 04:40:01.000000000 +0000 | ||
+++ test/ann_test.cpp | ||
@@ -281,7 +281,7 @@ using namespace std; // make std:: a | ||
//------------------------------------------------------------------------ | ||
|
||
const int STRING_LEN = 500; // max string length | ||
-const double ERR = 0.00001; // epsilon (for float compares) | ||
+const double ANN_ERR = 0.00001; // epsilon (for float compares) | ||
const double RND_OFF = 5E-16; // double round-off error | ||
|
||
//------------------------------------------------------------------------ | ||
@@ -1502,7 +1502,7 @@ void doValidation() // perform vali | ||
// reported i-th smallest | ||
double rept_dist = ANN_ROOT(curr_apx_dst[j]); | ||
// better than optimum? | ||
- if (rept_dist < true_dist*(1-ERR)) { | ||
+ if (rept_dist < true_dist*(1-ANN_ERR)) { | ||
Error("INTERNAL ERROR: True nearest neighbor incorrect", | ||
ANNabort); | ||
} |