message: nn_search.cpp edited online with Bitbucket
diff: #include <ringmesh/basic/nn_search.h>
  -#include <numeric>
  -
  namespace RINGMesh {
  template< index_t DIMENSION >
  @@ -70,14 +68,13 @@ namespace RINGMesh {
  double epsilon ) const
  {
  std::vector< index_t > index_map( nn_tree_->nb_points() );
  - std::iota( index_map.begin(), index_map.end(), 0 );
  std::atomic< index_t > nb_colocalised_vertices { 0 };
  parallel_for( nn_tree_->nb_points(),
  [this, &index_map, &nb_colocalised_vertices, &epsilon](index_t i) {
  std::vector< index_t > results = get_neighbors( point( i ), epsilon );
  index_t id {*std::min_element( results.begin(), results.end() )};
  - if( id < i ) {
  index_map[i] = id;
  + if( id < i ) {
  nb_colocalised_vertices++;
  }
  } );
  