Belle II Software development
|
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 acquired 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 () |
Acquire 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.
|
private |
|
private |
|
inlineexplicit |
Constructor taking properties with which the top node of the tree is initialised.
Definition at line 221 of file DynTree.h.
Create child nodes for the given parents.
Definition at line 284 of file DynTree.h.
|
inline |
Fell to tree meaning deleting all child nodes from the tree. Keeps the top node.
Definition at line 334 of file DynTree.h.
|
inline |
Gets the number of nodes currently contained in the tree Also demonstrates how to walk over the tree.
Definition at line 248 of file DynTree.h.
|
inline |
Gets the number of nodes by level in the tree Also demonstrates how to walk over the tree.
Definition at line 264 of file DynTree.h.
|
inline |
|
inline |
|
inlineprivate |
Acquire the next unused child node structure, recycling all memory.
|
inline |
Like fell but also releases all memory the tree has acquired during long execution.
Definition at line 349 of file DynTree.h.
|
inline |
Forward walk to the top node.
Definition at line 316 of file DynTree.h.
|
inline |
std::deque<typename Node::Children> m_children |
SubPropertiesFactory m_subPropertiesFactory |