@@ -42,7 +42,7 @@ NaturalNeighbors::~NaturalNeighbors()
4242int NaturalNeighbors::find_containing_triangle (double targetx, double targety, int start_triangle)
4343{
4444 int final_triangle;
45- final_triangle = walking_triangles (start_triangle, targetx, targety,
45+ final_triangle = walking_triangles (start_triangle, targetx, targety,
4646 x, y, nodes, neighbors);
4747 return final_triangle;
4848}
@@ -115,7 +115,7 @@ double NaturalNeighbors::interpolate_one(double *z, double targetx, double targe
115115 targetx, targety,
116116 INDEX2 (c, i, 0 ), INDEX2 (c, i, 1 ))) {
117117
118- // bail out with the appropriate values if we're actually on a
118+ // bail out with the appropriate values if we're actually on a
119119 // node
120120 if ((fabs (targetx - this ->x [INDEX3 (this ->nodes , t, j)]) < TOLERANCE_EPS)
121121 && (fabs (targety - this ->y [INDEX3 (this ->nodes , t, j)]) < TOLERANCE_EPS)) {
@@ -138,7 +138,7 @@ double NaturalNeighbors::interpolate_one(double *z, double targetx, double targe
138138 double ati = 0.0 ;
139139
140140 if (!onedge || ((edge[0 ] != q) && edge[1 ] != q)) {
141- ati = signed_area (vx, vy,
141+ ati = signed_area (vx, vy,
142142 INDEX2 (c, j, 0 ), INDEX2 (c, j, 1 ),
143143 INDEX2 (c, k, 0 ), INDEX2 (c, k, 1 ));
144144
@@ -160,11 +160,11 @@ double NaturalNeighbors::interpolate_one(double *z, double targetx, double targe
160160 // doesn't work so well. We'll take care of these two nodes here.
161161 if (onedge) {
162162
163- // If we're on the convex hull, then the other nodes don't actually
164- // contribute anything, just the nodes for the edge we're on. The
163+ // If we're on the convex hull, then the other nodes don't actually
164+ // contribute anything, just the nodes for the edge we're on. The
165165 // Voronoi "polygons" are infinite in extent.
166166 if (onhull) {
167- double a = (hypot (targetx-x[edge[0 ]], targety-y[edge[0 ]]) /
167+ double a = (hypot (targetx-x[edge[0 ]], targety-y[edge[0 ]]) /
168168 hypot (x[edge[1 ]]-x[edge[0 ]], y[edge[1 ]]-y[edge[0 ]]));
169169 return (1 -a) * z[edge[0 ]] + a*z[edge[1 ]];
170170 }
@@ -233,11 +233,11 @@ double NaturalNeighbors::interpolate_one(double *z, double targetx, double targe
233233
234234 for (sit = alltri0.begin (); sit != alltri0.end (); sit++) {
235235 poly0.push (INDEX2 (this ->centers , *sit, 0 ),
236- INDEX2 (this ->centers , *sit, 1 ));
236+ INDEX2 (this ->centers , *sit, 1 ));
237237 }
238238 for (sit = alltri1.begin (); sit != alltri1.end (); sit++) {
239239 poly1.push (INDEX2 (this ->centers , *sit, 0 ),
240- INDEX2 (this ->centers , *sit, 1 ));
240+ INDEX2 (this ->centers , *sit, 1 ));
241241 }
242242
243243 double a0 = poly0.area ();
@@ -256,20 +256,19 @@ double NaturalNeighbors::interpolate_one(double *z, double targetx, double targe
256256 return f;
257257}
258258
259- void NaturalNeighbors::interpolate_grid (double *z,
259+ void NaturalNeighbors::interpolate_grid (double *z,
260260 double x0, double x1, int xsteps,
261261 double y0, double y1, int ysteps,
262262 double *output,
263263 double defvalue, int start_triangle)
264264{
265- int i, ix, iy, rowtri, coltri, tri;
265+ int ix, iy, rowtri, coltri, tri;
266266 double dx, dy, targetx, targety;
267267
268268 dx = (x1 - x0) / (xsteps-1 );
269269 dy = (y1 - y0) / (ysteps-1 );
270270
271271 rowtri = 0 ;
272- i = 0 ;
273272 for (iy=0 ; iy<ysteps; iy++) {
274273 targety = y0 + dy*iy;
275274 rowtri = find_containing_triangle (x0, targety, rowtri);
@@ -284,7 +283,7 @@ void NaturalNeighbors::interpolate_grid(double *z,
284283 }
285284}
286285
287- void NaturalNeighbors::interpolate_unstructured (double *z, int size,
286+ void NaturalNeighbors::interpolate_unstructured (double *z, int size,
288287 double *intx, double *inty, double *output, double defvalue)
289288{
290289 int i, tri1, tri2;
0 commit comments