RINGMesh
Version 5.0.0
A programming library for geological model meshes
|
#include <nn_search.h>
Classes | |
class | Impl |
Public Member Functions | |
NNSearch (const std::vector< vecn< DIMENSION > > &vertices, bool copy=true) | |
~NNSearch ()=default | |
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. More... | |
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_points . More... | |
index_t | get_closest_neighbor (const vecn< DIMENSION > &v) const |
std::vector< index_t > | get_neighbors (const vecn< DIMENSION > &v, double threshold_distance) const |
template<typename TEST > | |
std::vector< index_t > | get_neighbors (const vecn< DIMENSION > &v, const TEST &test) const |
std::vector< index_t > | get_neighbors (const vecn< DIMENSION > &v, index_t nb_neighbors) const |
vecn< DIMENSION > | point (index_t v) const |
index_t | nb_points () const |
Private Member Functions | |
ringmesh_disable_copy_and_move (NNSearch) | |
ringmesh_template_assert_2d_or_3d (DIMENSION) | |
IMPLEMENTATION_MEMBER (impl_) | |
Definition at line 50 of file nn_search.h.
|
explicit |
Definition at line 135 of file nn_search.cpp.
|
default |
|
inline |
Gets the closest neighbor point
[in] | v | the point to test return returns the index of the closest point |
Definition at line 92 of file nn_search.h.
std::tuple< index_t, std::vector< index_t > > RINGMesh::NNSearch< DIMENSION >::get_colocated_index_mapping | ( | double | epsilon | ) | const |
Gets the index_map
that link all the duplicated points to their first occurancy.
Definition at line 155 of file nn_search.cpp.
std::tuple< index_t, std::vector< index_t >, std::vector< vecn< DIMENSION > > > RINGMesh::NNSearch< 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_points
.
Definition at line 177 of file nn_search.cpp.
std::vector< index_t > RINGMesh::NNSearch< DIMENSION >::get_neighbors | ( | const vecn< DIMENSION > & | v, |
double | threshold_distance | ||
) | const |
Compute the neighbors of a given point, point closer than
threshold_distance | ||
[in] | v | the point to test |
[in] | threshold_distance | distance defining the neighborhood |
Definition at line 205 of file nn_search.cpp.
|
inline |
Compute the neighbors of a given point according the
test | ||
[in] | v | the point to test |
Definition at line 117 of file nn_search.h.
std::vector< index_t > RINGMesh::NNSearch< DIMENSION >::get_neighbors | ( | const vecn< DIMENSION > & | v, |
index_t | nb_neighbors | ||
) | const |
Gets the neighboring points of a given one sorted by increasing distance
[in] | v | the point to test |
[in] | nb_neighbors | the number of neighbors to return |
nb_neighbors
if there is not enough points) Definition at line 216 of file nn_search.cpp.
|
private |
index_t RINGMesh::NNSearch< DIMENSION >::nb_points | ( | ) | const |
Definition at line 148 of file nn_search.cpp.
vecn< DIMENSION > RINGMesh::NNSearch< DIMENSION >::point | ( | index_t | v | ) | const |
Definition at line 142 of file nn_search.cpp.
|
private |
|
private |