Go to the documentation of this file.
24 template<
class o2mNode>
27 static o2mNode*
child(
const o2mNode* nd, uint j) {
return nd->child(j);}
32 template<
class o2mNode>
35 template<
class o2mNode>
41 template<
class o2mNode>
44 friend std::ostream& operator<< <>(std::ostream& os,
56 virtual const o2mNode*
root()
const = 0;
61 virtual std::ostream&
info(std::ostream& os)
const;
66 void sketch(std::ostream& os,
const o2mNode* rt = 0, uint l = 0)
const;
77 static Node*
lft(
const Node* nd) {
return nd->lft();}
78 static Node*&
lft(Node* nd) {
return nd->lft();}
80 static Node*
rght(
const Node* nd) {
return nd->rght();}
87 template<
class biNode>
94 virtual const biNode*
root()
const = 0;
101 template<
class BiClNode>
111 return new BiClNode(elm, ball,
lft);
117 return new BiClNode(idx,
lft,
rght, c, r, nlf);
128 os <<
"aglowav::BiClNode00(idx = " << nd.
index()
129 <<
", nleaf = " << nd.
nleaf();
130 return os <<
", r = " << nd.
radius() <<
", c = " << nd.
center() <<
')';
138 friend std::ostream& operator<< <> (std::ostream& os,
206 return (!j) ? lft_ : (nlf_ && j == 1) ? ne_.rght : (
BiClNode00<F>*)0;
216 #endif // aglowavTree_hh
An abstract class for an element of a space.
virtual const biNode * root() const =0
Root of the tree.
const concepts::Real3d & center() const
Cluster center.
virtual std::ostream & info(std::ostream &os) const
Information about the tree.
concepts::Real3d c_
Cluster center.
uint nlf_
Number of leafs in the subtree of the node.
virtual uint nleaf() const =0
Number of leafs.
Traits for the binary tree algorithm.
Binary node for the cluster and Haar wavelet agglomeration algorithm.
BiClNode00(const concepts::Element< F > &elm, const cluster::BBall< F > &ball, BiClNode00< F > *lft)
Constructor 1 (for a list of leafs, next leaf = left child)
uint nleaf() const
Number of leafs in the subtree of the node.
concepts::Real radius() const
Cluster radius.
Interface class for a node in a cluster tree.
Node -> rght, leaf -> elm.
const bem::Constant3d001< F > * element() const
Element of the node.
Traits for trees where the nodes have always a fixed number of leafs.
Constant space element with a level dependent key.
BiTreeTraits< biNode > Traits
How a Node has to behave.
static Node *& lft(Node *nd)
Abstract class to compute a bounding ball of an element (the leafs of a cluster tree).
static Node * rght(const Node *nd)
Right node.
BiClNode00< F > * child(uint j) const
j-th child of the node
Node::CF F
Field of the node (Real or Cmplx)
BiClNode00< F > * lft() const
Left child of the node.
concepts::Real r_
Cluster radius.
BiClNode00< F > * lft_
Left child of the node.
static BiClNode * newNode(uint idx, BiClNode &lft, BiClNode &rght, const concepts::Real3d &c, concepts::Real r, uint nlf=0)
Constructor of a new node (no leaf)
Traits for the binary cluster tree algorithm.
virtual const o2mNode * root() const =0
Root of the tree.
cluster::TreeTraits< BiClNode >::F F
Type of element (Real || Cmplx)
std::ostream & operator<<(std::ostream &os, const One2ManyTree< o2mNode > &t)
static BiClNode * newNode(const concepts::Element< F > &elm, const cluster::BBall< F > &ball, BiClNode *lft)
Constructor of a new leaf list (next leaf = left child)
NE ne_
Right child or element of the node.
void sketch(std::ostream &os, const o2mNode *rt=0, uint l=0) const
Sketches the structure of the tree.
F CF
Type of element (Real || Cmplx)
BiClNode00< F > * rght() const
Right child of the node.
One2ManyTreeTraits< o2mNode > Traits
How a Node has to behave.
virtual ~One2ManyTree()
Virtual destructor.
uint index() const
Cluster number.
const bem::Constant3d001< F > * elm
Used for the aglowav classes for the boundary element method.
static o2mNode * child(const o2mNode *nd, uint j)
BiClNode00(uint idx, BiClNode00< F > &lft, BiClNode00< F > &rght, const concepts::Real3d &c, concepts::Real r, uint nleaf=0)
Constructor 2 (new node, no leaf)
double Real
Type normally used for a floating point number.
static Node * lft(const Node *nd)
Left node.