RINGMesh  Version 5.0.0
A programming library for geological model meshes
RINGMesh::NNSearch< DIMENSION >::Impl Class Reference

Public Member Functions

 Impl (const std::vector< vecn< DIMENSION > > &vertices, bool copy)
 
 ~Impl ()
 
void fill_nn_search_points (index_t index_in_nn_search, const vecn< DIMENSION > &center)
 
vecn< DIMENSION > point (index_t v) const
 
index_t nb_points () const
 
std::vector< index_t > get_neighbors (const vecn< DIMENSION > &v, index_t nb_neighbors) const
 

Private Attributes

GEO::NearestNeighborSearch_var nn_tree_
 KdTree to compute the nearest neighbor search. More...
 
doublenn_points_
 Array of the points (size of DIMENSIONxnumber of points) More...
 
bool delete_points_
 Indicates if ann_points_ should be deleted. More...
 

Detailed Description

template<index_t DIMENSION>
class RINGMesh::NNSearch< DIMENSION >::Impl

Definition at line 52 of file nn_search.cpp.

Constructor & Destructor Documentation

◆ Impl()

template<index_t DIMENSION>
RINGMesh::NNSearch< DIMENSION >::Impl::Impl ( const std::vector< vecn< DIMENSION > > &  vertices,
bool  copy 
)
inline

Definition at line 55 of file nn_search.cpp.

◆ ~Impl()

template<index_t DIMENSION>
RINGMesh::NNSearch< DIMENSION >::Impl::~Impl ( )
inline

Definition at line 74 of file nn_search.cpp.

Member Function Documentation

◆ fill_nn_search_points()

template<index_t DIMENSION>
void RINGMesh::NNSearch< DIMENSION >::Impl::fill_nn_search_points ( index_t  index_in_nn_search,
const vecn< DIMENSION > &  center 
)
inline

Definition at line 82 of file nn_search.cpp.

◆ get_neighbors()

template<index_t DIMENSION>
std::vector< index_t > RINGMesh::NNSearch< DIMENSION >::Impl::get_neighbors ( const vecn< DIMENSION > &  v,
index_t  nb_neighbors 
) const
inline

Definition at line 106 of file nn_search.cpp.

◆ nb_points()

template<index_t DIMENSION>
index_t RINGMesh::NNSearch< DIMENSION >::Impl::nb_points ( ) const
inline

Definition at line 101 of file nn_search.cpp.

◆ point()

template<index_t DIMENSION>
vecn< DIMENSION > RINGMesh::NNSearch< DIMENSION >::Impl::point ( index_t  v) const
inline

Definition at line 91 of file nn_search.cpp.

Member Data Documentation

◆ delete_points_

template<index_t DIMENSION>
bool RINGMesh::NNSearch< DIMENSION >::Impl::delete_points_
private

Indicates if ann_points_ should be deleted.

No need to delete nn_points_ if it is a simple pointer to the mesh vertex array.

Definition at line 131 of file nn_search.cpp.

◆ nn_points_

template<index_t DIMENSION>
double* RINGMesh::NNSearch< DIMENSION >::Impl::nn_points_
private

Array of the points (size of DIMENSIONxnumber of points)

Definition at line 125 of file nn_search.cpp.

◆ nn_tree_

template<index_t DIMENSION>
GEO::NearestNeighborSearch_var RINGMesh::NNSearch< DIMENSION >::Impl::nn_tree_
private

KdTree to compute the nearest neighbor search.

Definition at line 123 of file nn_search.cpp.


The documentation for this class was generated from the following file: