#include <KdTree.hpp>
Public Member Functions | |
| template<typename NodeMap , typename NodeToChildMap > | |
| void | build (NodeType *root, NodeMap &c, NodeToChildMap &links) |
| template<typename... T> | |
| void | cleanUp (T &&...t) |
| void | enumerateNodes () |
| template<typename Derived > | |
| const NodeType * | getLeaf (const MatrixBase< Derived > &point) const |
| const NodeType * | getLeaf (const std::size_t &leafIndex) const |
| const LeafContainerType & | getLeafs () |
| const NodeType * | getLowestCommonAncestor (const NodeType *a, const NodeType *b) |
| const NodeType * | getNode (const std::size_t &globalIndex) const |
| const NodeContainerType & | getNodes () |
| const NodeType * | getRootNode () |
| std::tuple< std::size_t, std::size_t > | getStatistics () |
| void | resetTree () |
| TreeBase () | |
| TreeBase (TreeBase &&t) | |
| TreeBase (const TreeBase &t) | |
| template<typename T > | |
| TreeBase (const TreeBase< T > &t) | |
Protected Member Functions | |
| template<typename T > | |
| void | copyFrom (const TreeBase< T > &tree) |
| ~TreeBase () | |
| Prohibit the use of this base polymophically. More... | |
Protected Attributes | |
| NodeContainerType | m_leafs |
| Only leaf nodes , continously index ordered: leafs[idx]->getIdx() < leafs[idx+1]->getIdx();. More... | |
| NodeContainerType | m_nodes |
| All nodes, continously index ordered, with first element = m_root. More... | |
| NodeType * | m_root = nullptr |
| Root node, has index 0! More... | |
Friends | |
| template<typename T > | |
| class | TreeBase |
| class | XML |
Forward declar all tree classes
======================================================================================= Tree stuff ============================================================================
Definition at line 719 of file KdTree.hpp.
|
inline |
Definition at line 1267 of file KdTree.hpp.
|
inline |
Definition at line 1269 of file KdTree.hpp.
|
inline |
Definition at line 1277 of file KdTree.hpp.
|
inlineexplicit |
Definition at line 1282 of file KdTree.hpp.
|
inlineprotected |
Prohibit the use of this base polymophically.
Definition at line 1334 of file KdTree.hpp.
|
inline |
Built a tree from a node map and links c is a associative container of nodes with type NodeType where the key type is std::size_t and value type is a pointe to type NodeType. The tree owns the pointers afterwards! links is an associative container with type NodeToChildMap where the key is std::size_t and specifies the parent and the value type is a std::pair<std::size_t,std::size_t> for left and right child node indices in the map c.
Definition at line 1349 of file KdTree.hpp.
|
inline |
Clean up the nodes. Parameter are perfectly forwarded to NodeType::cleanUp(...)
Definition at line 1523 of file KdTree.hpp.
|
inlineprotected |
Deep copy, copies all nodes, and leafs , and links childs together Special links added to the Node classes are not preserved! For example: BoundaryInformation Therefore a newNode->setup() routine is called for each new copied node at the end of this function such that every newNode can setup these special links by accesing a (index,newNode) map and the oldNode.
Definition at line 1298 of file KdTree.hpp.
|
inline |
Enumerate nodes (continously, leafs first, then non-leafs This is reflected in the list m_nodes too, which needs to correspond to getIdx()!
Definition at line 1538 of file KdTree.hpp.
|
inline |
Get cell index of the leaf which owns point point point is the d-dimensional point in the frame of reference the kd-Tree was built! Points outside the roots AABB box, are naturally project to the most outer leaf automatically.
Definition at line 1420 of file KdTree.hpp.
|
inline |
Definition at line 1492 of file KdTree.hpp.
|
inline |
Definition at line 1499 of file KdTree.hpp.
|
inline |
Get common ancestor of two nodes Complexity: O(h) algorithm
Definition at line 1440 of file KdTree.hpp.
|
inline |
Definition at line 1503 of file KdTree.hpp.
|
inline |
Definition at line 1510 of file KdTree.hpp.
|
inline |
Definition at line 1514 of file KdTree.hpp.
|
inline |
Definition at line 1530 of file KdTree.hpp.
|
inline |
Definition at line 1404 of file KdTree.hpp.
Definition at line 1262 of file KdTree.hpp.
|
friend |
Definition at line 1565 of file KdTree.hpp.
|
protected |
Only leaf nodes , continously index ordered: leafs[idx]->getIdx() < leafs[idx+1]->getIdx();.
Definition at line 1568 of file KdTree.hpp.
|
protected |
All nodes, continously index ordered, with first element = m_root.
Definition at line 1569 of file KdTree.hpp.
|
protected |
Root node, has index 0!
Definition at line 1571 of file KdTree.hpp.