|
| | KDTree ()=default |
| |
| | KDTree (const bool include_weights, const int p) |
| |
| | KDTree (KDTree *const father, const int coords_number, const bool is_left) |
| |
| KDTreeMap | build (dataType *data, const int &ptNumber, const int &dimension, const std::vector< std::vector< dataType > > &weights={}, const int &weightNumber=1, const int &nodeNumber=-1, const bool &preciseBoundingBox=false) |
| |
| void | buildRecursive (dataType *data, std::vector< int > &idx_side, const int &ptNumber, const int &dimension, KDTree< dataType, Container > *parent, KDTreeMap &correspondence_map, const int &nodeNumber, const int &maximumLevel, int &createdNumberNode, const std::vector< std::vector< dataType > > &weights={}, const int &weightNumber=1) |
| |
| void | updateWeight (const dataType new_weight, const int weight_index=0) |
| |
| void | updateMinSubweight (const int weight_index=0) |
| |
| void | getKClosest (const unsigned int k, const Container &coordinates, KDTreeMap &neighbours, std::vector< dataType > &costs, const int weight_index=0) |
| |
| template<typename PowerFunc> |
| void | recursiveGetKClosest (const unsigned int k, const Container &coordinates, KDTreeMap &neighbours, std::vector< dataType > &costs, const int weight_index, const PowerFunc &power) |
| |
| template<typename PowerFunc> |
| dataType | getCost (const Container &coordinates, const PowerFunc &power) const |
| |
| template<typename PowerFunc> |
| dataType | distanceToBox (const KDTree< dataType, Container > &subtree, const Container &coordinates, const PowerFunc &power) const |
| |
| const std::vector< dataType > & | getCoordinates () const |
| |
| dataType | getWeight (const int weight_index=0) const |
| |
| dataType | getMinSubWeight (const int weight_index=0) const |
| |
| bool | isLeaf () const |
| |
| bool | isRoot () const |
| |
template<typename dataType, typename Container>
class ttk::KDTree< dataType, Container >
TTK KD-Tree.
- Author
- Joseph Budin josep.nosp@m.h.bu.nosp@m.din@p.nosp@m.olyt.nosp@m.echni.nosp@m.que..nosp@m.edu
- Date
- June 2018
Definition at line 21 of file KDTree.h.
template<typename dataType, typename Container>
| void ttk::KDTree< dataType, Container >::getKClosest |
( |
const unsigned int | k, |
|
|
const Container & | coordinates, |
|
|
KDTreeMap & | neighbours, |
|
|
std::vector< dataType > & | costs, |
|
|
const int | weight_index = 0 ) |
Puts the k closest points to the given coordinates in the "neighbours" vector along with their costs in the "costs" vector The output is not sorted, if you are interested in the k nearest neighbours in the order, will need to sort them according to their cost.
Definition at line 433 of file KDTree.h.