| 84 |
|
return(ip); |
| 85 |
|
} |
| 86 |
|
|
| 87 |
+ |
/* Set minimum distance under which samples will start to merge */ |
| 88 |
+ |
void |
| 89 |
+ |
interp2_spacing(INTERP2 *ip, double mind) |
| 90 |
+ |
{ |
| 91 |
+ |
if (mind <= 0) |
| 92 |
+ |
return; |
| 93 |
+ |
if ((.998*ip->dmin <= mind) && (mind <= 1.002*ip->dmin)) |
| 94 |
+ |
return; |
| 95 |
+ |
if (ip->da != NULL) { /* will need to recompute distribution */ |
| 96 |
+ |
free(ip->da); |
| 97 |
+ |
ip->da = NULL; |
| 98 |
+ |
} |
| 99 |
+ |
ip->dmin = mind; |
| 100 |
+ |
} |
| 101 |
+ |
|
| 102 |
+ |
/* Modify smoothing parameter by the given factor */ |
| 103 |
+ |
void |
| 104 |
+ |
interp2_smooth(INTERP2 *ip, double sf) |
| 105 |
+ |
{ |
| 106 |
+ |
if ((ip->smf *= sf) < NI2DSMF) |
| 107 |
+ |
ip->smf = NI2DSMF; |
| 108 |
+ |
} |
| 109 |
+ |
|
| 110 |
|
/* private call-back to sort position index */ |
| 111 |
|
static int |
| 112 |
|
cmp_spos(const void *p1, const void *p2) |