Class xlifepp::KdNode#

template<class T>
class KdNode#

node of a KdTree

Public Functions

inline KdNode()#

default constructor

inline KdNode(const T *O, int s, KdNode *p)#

basic constructor

~KdNode()#

destructor

template<typename It>
void build(It, It)#

build a balanced subtree from objects pointers [b,e)

build a balanced subtree from the objects pointed by [b,e) (not empty): recursive median split along the direction of largest extent; the objects of the left subtree have their component separator_ <= sv_ and those of the right subtree >= sv_, as required by searchNearest and insert (inserting ordered objects one by one gives a very deep tree)

number_t &depth(number_t&) const#

return node depth

void insert(const T*)#

node insertion

inline bool isVoid() const#

true if a void node

inline const T *objectp() const#

return object pointer linked to node

void print(std::ostream&, std::string&) const#

print utility

void printBoxes(std::ostream &os, Box<SvType> b) const#

print utility

void searchNearest(const T*, const T*&, SvType&)#

search in tree from current node

Friends

template<class S>
friend std::ostream &operator<<(std::ostream &os, const KdNode<S> &node)#

print operator