49 template < index_t DIMENSION >
70 std::tuple< index_t, std::vector< index_t > >
83 std::vector< index_t >,
84 std::vector< vecn< DIMENSION > > >
86 double epsilon )
const;
94 index_t nb_neighbors{ 1 };
116 template <
typename TEST >
120 std::vector< index_t > result;
124 index_t nb_neighbors{ std::min( index_t( 5 ),
nb_points ) };
125 index_t cur_neighbor{ 0 };
126 index_t prev_neighbor{ 0 };
129 prev_neighbor = cur_neighbor;
130 cur_neighbor += nb_neighbors;
131 result.reserve( cur_neighbor );
133 nb_neighbors =
static_cast< index_t
>( neighbors.size() );
134 for(
auto i :
range( prev_neighbor, cur_neighbor ) )
136 if( test( neighbors[i] ) )
140 result.push_back( neighbors[i] );
142 }
while( result.size() == cur_neighbor
index_t get_closest_neighbor(const vecn< DIMENSION > &v) const
GEO::vecng< DIMENSION, double > vecn
std::vector< index_t > get_neighbors(const vecn< DIMENSION > &v, const TEST &test) const
ringmesh_template_assert_2d_or_3d(DIMENSION)
index_t nb_points() const
NNSearch(const std::vector< vecn< DIMENSION > > &vertices, bool copy=true)
vecn< DIMENSION > point(index_t v) const
Classes to build GeoModel from various inputs.
IMPLEMENTATION_MEMBER(impl_)
std::vector< index_t > get_neighbors(const vecn< DIMENSION > &v, double threshold_distance) const
std::tuple< index_t, std::vector< index_t > > get_colocated_index_mapping(double epsilon) const
Gets the index_map that link all the duplicated points to their first occurancy.
ringmesh_disable_copy_and_move(NNSearch)
std::tuple< index_t, std::vector< index_t >, std::vector< vecn< DIMENSION > > > get_colocated_index_mapping_and_unique_points(double epsilon) const
Gets the index_map that link all the points to a no duplicated list of index in the list of unique_po...