| 1358 | // checkerboard approach to avoid write collisions. |
| 1359 | template <typename TIds> |
| 1360 | void BucketList2D<TIds>::MergePoints(double tol, vtkIdType* mergeMap) |
| 1361 | { |
| 1362 | // First mark all points as uninitialized |
| 1363 | std::fill_n(mergeMap, this->NumPts, (-1)); |
| 1364 | |
| 1365 | // If tol=0, then just process points bucket by bucket. Don't have to worry |
| 1366 | // about points in other buckets. |
| 1367 | if (tol <= 0.0) |
| 1368 | { |
| 1369 | MergePrecise<TIds> merge(this, mergeMap); |
| 1370 | vtkSMPTools::For(0, this->NumBuckets, merge); |
| 1371 | } |
| 1372 | |
| 1373 | // Merge within a tolerance. This is a greedy algorithm that can give |
| 1374 | // weird results since exactly which points to merge with is not an |
| 1375 | // obvious answer (without doing fancy clustering etc). |
| 1376 | else |
| 1377 | { |
| 1378 | MergeClose<TIds> merge(this, tol, mergeMap); |
| 1379 | vtkSMPTools::For(0, this->NumPts, merge); |
| 1380 | } |
| 1381 | } |
| 1382 | |
| 1383 | //------------------------------------------------------------------------------ |
| 1384 | // Internal method to find those buckets that are within distance specified |
nothing calls this directly
no test coverage detected