![]() |
Belle II Software
release-08-02-06
|
This is the base class for all hough trees. More...
#include <DynTree.h>
Classes | |
class | Node |
Class for a node in the tree. More... | |
Public Member Functions | |
DynTree (const Properties &properties, const SubPropertiesFactory &subPropertiesFactory=SubPropertiesFactory()) | |
Constructor taking properties with which the top node of the tree is initialised. | |
DynTree (const DynTree &node)=delete | |
Forbid copy construction. | |
DynTree & | operator= (const DynTree &)=delete |
Forbid copy assignment. | |
Node & | getTopNode () |
Getter for the top node of the tree. | |
const Node & | getTopNode () const |
Constant getter for the top node of the tree. | |
int | getNNodes () const |
Gets the number of nodes currently contained in the tree Also demonstrates how to walk over the tree. | |
std::map< int, int > | getNNodesByLevel () const |
Gets the number of nodes by level in the tree Also demonstrates how to walk over the tree. | |
template<class AWalker > | |
void | walk (AWalker &walker) |
Forward walk to the top node. | |
template<class AWalker , class APriorityMeasure > | |
void | walk (AWalker &walker, APriorityMeasure &priority) |
Forward walk to the top node. | |
void | fell () |
Fell to tree meaning deleting all child nodes from the tree. Keeps the top node. | |
void | raze () |
Like fell but also releases all memory the tree has aquired during long execution. | |
Public Attributes | |
SubPropertiesFactory | m_subPropertiesFactory |
Instance of the properties factory for the sub nodes. | |
Node | m_topNode |
Memory for the top node of the tree. | |
std::deque< typename Node::Children > | m_children |
Central point to provide memory for the child structures. | |
size_t | m_nUsedChildren = 0 |
Last index of used children. | |
Private Types | |
using | This = DynTree< AProperties, ASubPropertiesFactory > |
Type of this class. | |
using | Properties = AProperties |
Type of the Properties. | |
using | SubPropertiesFactory = ASubPropertiesFactory |
Type of the factory for the sub node properties. | |
Private Member Functions | |
std::vector< Node > * | createChildren (Node *parentNode) |
Create child nodes for the given parents. | |
std::vector< Node > * | getUnusedChildren () |
Aquire the next unused child node structure, recycling all memory. | |
This is the base class for all hough trees.
It stores its children trees (each tree has children trees itself to reuse this class) as nodes, and has basic functionality to fill and go through ( = walk) all its children and the chdilren of its children etc.