@@ -79,8 +79,7 @@ namespace geode
7979 }
8080
8181 std::vector< index_t > frame_neighbors ( const Point< dimension >& point,
82- const Frame< dimension >& epsilons_frame,
83- const double factor_distance ) const
82+ const Frame< dimension >& epsilons_frame ) const
8483 {
8584 std::vector< nanoflann::ResultItem< index_t , double > > results;
8685 nanoflann::SearchParameters params;
@@ -89,8 +88,7 @@ namespace geode
8988 epsilons_frame.max_elongation_direction ();
9089 const auto max_elongation =
9190 epsilons_frame.direction ( max_elongation_direction ).length ();
92- const auto radius = factor_distance * factor_distance
93- * max_elongation * max_elongation;
91+ const auto radius = max_elongation * max_elongation;
9492 const auto nb_results = nn_tree_.radiusSearch (
9593 © ( point )[0 ], radius, results, params );
9694 std::vector< index_t > indices;
@@ -193,14 +191,12 @@ namespace geode
193191 typename geode::NNSearch< dimension >::ColocatedInfo
194192 colocated_index_mapping (
195193 const geode::NNSearch< dimension >& nn_search,
196- const Frame< dimension >& epsilons_frame,
197- const double factor_distance ) const
194+ const Frame< dimension >& epsilons_frame ) const
198195 {
199196 for ( const auto d : LRange{ dimension } )
200197 {
201198 OPENGEODE_EXCEPTION (
202- epsilons_frame.direction ( d ).length () * factor_distance
203- >= GLOBAL_EPSILON,
199+ epsilons_frame.direction ( d ).length () >= GLOBAL_EPSILON,
204200 " [NNSearch::colocated_index_mapping] Given epsilon too "
205201 " small, "
206202 " should be bigger than GLOBAL_EPSILON (i.e. " ,
@@ -211,15 +207,14 @@ namespace geode
211207 std::vector< index_t > mapping ( nb_points, NO_ID );
212208 std::mutex mutex;
213209 async::parallel_for ( async::irange ( index_t { 0 }, nb_points ),
214- [&nn_search, &epsilons_frame, &factor_distance , &mapping,
215- &mutex, this ]( index_t point_id ) {
210+ [&nn_search, &epsilons_frame, &mapping , &mutex, this ](
211+ index_t point_id ) {
216212 if ( mapping[point_id] != NO_ID )
217213 {
218214 return ;
219215 }
220- const auto vertices_around =
221- frame_neighbors ( nn_search.point ( point_id ),
222- epsilons_frame, factor_distance );
216+ const auto vertices_around = frame_neighbors (
217+ nn_search.point ( point_id ), epsilons_frame );
223218 std::lock_guard< std::mutex > lock ( mutex );
224219 if ( mapping[point_id] != NO_ID )
225220 {
@@ -357,10 +352,9 @@ namespace geode
357352 template < index_t dimension >
358353 std::vector< index_t > NNSearch< dimension >::frame_neighbors(
359354 const Point< dimension >& point,
360- const Frame< dimension >& epsilons_frame,
361- const double factor_distance ) const
355+ const Frame< dimension >& epsilons_frame ) const
362356 {
363- return impl_->frame_neighbors ( point, epsilons_frame, factor_distance );
357+ return impl_->frame_neighbors ( point, epsilons_frame );
364358 }
365359
366360 template < index_t dimension >
@@ -381,11 +375,9 @@ namespace geode
381375 template < geode::index_t dimension >
382376 typename geode::NNSearch< dimension >::ColocatedInfo
383377 NNSearch< dimension >::colocated_index_mapping(
384- const Frame< dimension >& epsilons_frame,
385- const double factor_distance ) const
378+ const Frame< dimension >& epsilons_frame ) const
386379 {
387- return impl_->colocated_index_mapping (
388- *this , epsilons_frame, factor_distance );
380+ return impl_->colocated_index_mapping ( *this , epsilons_frame );
389381 }
390382
391383 template class opengeode_geometry_api NNSearch< 2 >;
0 commit comments