33 #include <boost/tuple/tuple.hpp>
34 #include <boost/tuple/tuple_comparison.hpp>
35 #include <boost/tuple/tuple_io.hpp>
37 #include <feel/feelcore/feel.hpp>
70 typedef ublas::vector<double> node_type;
72 typedef boost::tuple<node_type, size_type, uint16_type, size_type> index_node_type;
73 typedef std::vector<index_node_type> points_type;
74 typedef points_type::iterator points_iterator;
75 typedef points_type::const_iterator points_const_iterator;
78 typedef boost::tuple<node_type, size_type, uint16_type, size_type, double > index_node_search_type;
79 typedef std::vector<index_node_search_type> points_search_type;
80 typedef points_search_type::iterator points_search_iterator;
81 typedef points_search_type::const_iterator points_search_const_iterator;
95 M_distanceMax( INT_MAX ),
100 M_tree( tree.M_tree ),
102 M_node_search( tree.M_node_search ),
103 M_PtsNearest( tree.M_PtsNearest ),
104 M_distanceMax( tree.M_distanceMax ),
105 M_nbPtMax( tree.M_nbPtMax )
214 M_pts.push_back( boost::make_tuple( n, i, comp,indice_global ) );
221 const node_type &min,
222 const node_type &max );
227 void search(
const node_type & node_ );
251 void run_search( Element * tree, uint16_type iter );
256 void update_Pts_search(
const index_node_type & p );
263 node_type M_node_search;
265 points_search_type M_PtsNearest;
267 double M_distanceMax;
size_type nPoints() const
Definition: kdtree.hpp:130
void pointsInBox(points_type &inpts, const node_type &min, const node_type &max)
Definition: kdtree.cpp:575
size_type addPoint(node_type const &n, size_type indice_global=0)
Definition: kdtree.hpp:200
void nbNearNeighbor(size_type n)
Definition: kdtree.hpp:191
void reserve(size_type n)
Definition: kdtree.hpp:183
KDTree class.
Definition: kdtree.hpp:58
size_t size_type
Indices (starting from 0)
Definition: feelcore/feel.hpp:319
void clear()
Definition: kdtree.hpp:174
void addPointWithId(const node_type &n, size_type i, uint16_type comp, size_type indice_global=0)
Definition: kdtree.hpp:209
const points_type & points() const
Definition: kdtree.hpp:138
void search(const node_type &node_)
Definition: kdtree.cpp:614
void showResultSearch()
Definition: kdtree.cpp:640
const points_search_type & pointsNearNeighbor() const
Definition: kdtree.hpp:146
void writeLatexData(std::string __nameFile="kdtreeData.tex")
Definition: kdtree.cpp:825