31 |
|
#ifndef RSCA |
32 |
|
#define RSCA 2.0 /* radius scaling factor (empirical) */ |
33 |
|
#endif |
34 |
+ |
#ifndef MAXSLOPE |
35 |
+ |
#define MAXSLOPE 200.0 /* maximum slope for smooth region */ |
36 |
+ |
#endif |
37 |
|
#ifndef SMOOTH_MSE |
38 |
|
#define SMOOTH_MSE 5e-5 /* acceptable mean squared error */ |
39 |
|
#endif |
212 |
|
return(1); /* colinear values */ |
213 |
|
A = DOT(rMtx[0], xvec); |
214 |
|
B = DOT(rMtx[1], xvec); |
215 |
+ |
if (A*A + B*B > MAXSLOPE*MAXSLOPE) /* too steep? */ |
216 |
+ |
return(0); |
217 |
|
C = DOT(rMtx[2], xvec); |
218 |
|
sqerr = 0.0; /* compute mean squared error */ |
219 |
|
for (x = x0; x < x1; x++) |