6#ifndef clusterTree03_hh
7#define clusterTree03_hh
26 Node* lnk) {
return new Node(elm, ball, lnk);}
29 return new Node(idx, chld, c, r, nlf);
32 static Node* child(
const Node* nd) {
return nd->child();}
33 static Node* link(
const Node* nd) {
return nd->link();}
34 static Node*& link(Node* nd) {
return nd->link();}
48 typedef typename Traits::F F;
74 std::unordered_map<uint, uint> vtxtag_;
81 : nvtx_(nvtx), vtxtag_(), tag_(0) {
97 typedef typename Traits::F F;
107 inline ~Tree03() {destructor_(root_);
delete root_;}
110 inline uint
nclst()
const {
return nclst_;}
112 inline uint
nleaf()
const {
return nlf_;}
114 inline const CNode*
root()
const {
return root_;}
121 void sketch(std::ostream& os,
const CNode* lnk = 0, uint l = 0);
138 void destructor_(CNode* clst);
140 CNode* concat_(CNode* a, CNode* b);
void operator()(const Node *lfset, concepts::Real3d &c, concepts::Real &r, const concepts::Real3d *(&e)[4], uint &ne)
TreeTraits03< Node > Traits
Interface for the algorithm.
uint nclst() const
Number of clusters.
TreeTraits03< CNode > Traits
Interface of the tree.
uint nleaf() const
Number of leafs.
void sketch(std::ostream &os, const CNode *lnk=0, uint l=0)
const CNode * root() const
Root node of the tree.
Tree03(const concepts::Space< F > &spc, const BBall< F > &ball, uint nlfmin=1)
Node::CF F
Field of the node (Real or Cmplx)