Class xlifepp::ClusterNode#
-
template<typename T>
class ClusterNode#
-
Inheritence diagram for xlifepp::ClusterNode:
Collaboration diagram for xlifepp::ClusterNode:
describes a node of a hierarchical cluster of T objects (mean Point for instance) it manages
a pointer to the cloud object (objects_)
a xyz bounding box of the node, may be not the smallest
a xyz real bounding box of the node if required
some pointers to move in the tree (parent_, child_, next_)
the indices of objects belonging to the box (numbers_), may be deallocated for node that are not leaf (see storeNodeData_)
an optional list of dof numbers
an optional list of element pointers
Note
a node is never void
Public Functions
-
const BoundingBox &box() const#
-
return the real bounding box if allocated else return the bounding box
-
real_t boxDiameter() const#
-
diameter ot the (real) bounding box
-
void clear()#
-
clear cluster node (recursive)
-
void divideNode(ClusteringMethod, number_t, number_t = 0, bool = true, bool = true)#
-
divide set of points along the clustering method (create children)
divide set of points along the clustering method (create children) - recursive meth: clustering method: _regularBisection: split along the maximal direction the current box in two boxes of same size _boundingBoxBisection: same spliting as regular method but set the split boxes to their xyz minimal bounding box _cardinalityBisection) : split along the maximal direction in two boxes having the same number of points (to 1 near) maxinleaf: the maximum number of points in a leaf maxdepth: the maximal depth of the tree, if maxdepth=0, depth criteria is not used storeNodeData: if true, data (numbers, bounding boxes, …) are stored for each node else they are only stored for each leaves rmEmptyBox: if true empty box are removed from tree
-
std::vector<number_t> getDofNumbers(bool store = false) const#
-
list of dof numbers related to a node, can build on fly
-
std::vector<Element*> getElements(bool store = false) const#
-
list of element numbers related to a node, can build on fly
-
std::vector<ClusterNode*> getLeaves() const#
-
get leave pointers of the tree
-
std::list<number_t> getNumbers(bool store) const#
-
get numbers as a list (recursive) with a storing option
get numbers if numbers_ vector already exists return it as a list else build the list recursively when store is true, the number lists are stored
-
const std::vector<number_t> &getParentNumbers() const#
-
get parentNumbers_ vector
get parentNumbers_ vector parentNumbers[i] gives the rank of the ith object in parent numbering if does not exist, built on the fly
-
bool isCloseTo(const ClusterNode<T>&, real_t = 1.) const#
-
test if a node is close to an other one
test if a node is close to an other one, for the moment use dist(b1,b2) <= eta*max(diam(b1), diam(b2))
-
void print(std::ostream&) const#
-
print tree from current node (recursive)
-
void printLeaves(std::ostream&) const#
-
print leaves of the tree
-
void printNode(std::ostream&, bool shift = true) const#
-
print node
-
void saveToFile(const string_t&, number_t, bool withRealBox = false) const#
-
save points and bounding boxes or real bounding boxes on file
-
void setBoundingBox()#
-
set the bounding box from characteristic point of objects
set the bounding box of a cluster node
-
void setRealBoundingBox()#
-
set the real bounding box, i.e from bounding box of objects
set the real bounding box of a cluster node from bounding boxes of objects, numbers_ has to be allocated !
-
void updateAllParentNumbers()#
-
update recursively all parentNumbers_ vector
update recursively parentNumbers_ vectors of all nodes parentNumbers[i] gives the rank of the ith object in parent numbering
-
void updateBoundingBoxes()#
-
update recursively bounding boxes
update recursively the real bounding boxes of a cluster node, numbers_ has to be allocated !
-
void updateCloseNodes(CloseNodeRule, real_t = 1.)#
-
update recursively closeNodes vector
-
void updateDofNumbers()#
-
update recursively dofNumbers
-
void updateElements()#
-
update recursively elements
-
void updateNumbers()#
-
update recursively numbers_ vector
update recursively numbers_ vectors if they are are empty
-
void updateParentNumbers()#
-
update parentNumbers_ vector
update parentNumbers_ vector of current node parentNumbers[i] gives the rank of the ith object in parent numbering
-
void updateRealBoundingBoxes()#
-
update recursively real bounding boxes
update recursively the real bounding boxes of a cluster node, numbers_ has to be allocated !
Public Members
-
BoundingBox boundingBox_#
-
bounding box from characteristic points of objects
-
ClusterNode *child_#
-
pointer to its first child, if 0 no child
-
mutable std::list<ClusterNode<T>*> closeNodes_#
-
list of close nodes, built on demand
-
ClusterNode *next_#
-
pointer to its brother, if 0 no brother
-
mutable std::vector<number_t> numbers_#
-
list of object numbers related to objects vector (start at 0)
-
ClusterNode *parent_#
-
pointer to its parent, if 0 root node
-
BoundingBox realBoundingBox_#
-
bounding box from bounding boxes of objects, differs from boundingBox_ if T is larger than a point