└>Geo::TreeNode< GeoClusterNode >
Debugging output representation of a hierarchy of clustering metrics.
Name | Description |
---|---|
~TreeNode() | Destructor. |
AddChild(const _Ty &) | Add a child node with the given value 'val'. |
AddLevelTags(void) | Fills in the m_Level and m_LevelClusterIdx properties for each node in the tree. |
BuildLinearIdLookupRecursive(ClusterIdLookup &) | Builds a linear ID lookup. |
BuildRangeArrayRecursive(ClusterRangeArray &, Geo::s32, Geo::s32) | Builds a range array. |
DeleteChild(Geo::s32) | Delete the child with index 'idx', children of the node is assigned to this node at the end of the child array. |
DeleteSubTree(Geo::s32) | Delete the child with index 'idx' and all nodes below this child. |
FindNode(const Geo::s32 &) | Locate a node with the given linear index in the tree. |
GetChild(Geo::s32) | Get child with index 'idx', NULL if 'idx' is out of range. |
GetChild(Geo::s32) | Get child with index 'idx', NULL if 'idx' is out of range. |
GetDepth() | Get the depth of the node. |
GetLeaves(Geo::GeoArray< const TreeNode< _Ty > * > &) | Fills in an array of all the leaf nodes underneath this node. Returns the total number of leaves in the resulting array. |
GetLevelFromRoot(Geo::GeoArray< TreeNode< _Ty > * > &, Geo::s32) | Return an array of nodes at the given depth ordered from left to right in the tree. |
GetLevelFromRoot(Geo::GeoArray< const TreeNode< _Ty > * > &, Geo::s32) | Return an array of nodes at the given depth ordered from left to right in the tree. |
GetNumChildren() | Number of immediate children nodes. |
GetNumInternalNodes() | Total number of internal nodes in the tree (i.e. not leaves) |
GetNumLevels() | Get the number of levels in the tree. |
GetNumNodes() | Total number of nodes in the tree. |
GetNumNodes(Geo::s32) | Total number of nodes in a given level. |
GetParent() | Get the parent node, NULL if this is the root. |
GetParent() | Get the parent node, NULL if this is the root. |
GetRoot() | Get the root of the tree. |
GetRoot() | Get the root of the tree. |
GetValue() | Get the value stored in the node. |
GetValue() | Get the value stored in the node. |
IsLeaf() | Returns whether this is a leaf node, i.e. has no children. |
IsRoot() | Returns whether this is a root node, i.e. has no parent. |
Load(Geo::IGeoInputStream &) | Load tree from disk. |
Load(Geo::IGeoInputStream &) | Loads object from the provided stream. |
NonCopyable(NonCopyable &&) | Defaulted to allow move. |
operator=(NonCopyable &&) | Defaulted to allow move. |
RemoveChild(Geo::s32) | Remove and return the child with index 'idx' from the tree. |
Save(Geo::IGeoStream &) | Save tree to disk. |
SetValue(const _Ty &) | Set the value stored in the node. |
TreeNode() | Constructor. |
public: ~TreeNode()
Destructor.
public: TreeNode< _Ty > * AddChild
(
const _Ty & val
)
Add a child node with the given value 'val'.
public: bool AddLevelTags
(
void
)
Fills in the m_Level and m_LevelClusterIdx properties for each node in the tree.
This is called from Load(), but if you are manually creating a tree you must call this once you have finished adding nodes.
public: void BuildLinearIdLookupRecursive
(
ClusterIdLookup & lookup
) const
Builds a linear ID lookup.
public: Geo::s32 BuildRangeArrayRecursive
(
ClusterRangeArray & rangeArray,
Geo::s32 bottomLevel,
Geo::s32 currentLevel
) const
Builds a range array.
public: bool DeleteChild
(
Geo::s32 idx
)
Delete the child with index 'idx', children of the node is assigned to this node at the end of the child array.
public: bool DeleteSubTree
(
Geo::s32 idx
)
Delete the child with index 'idx' and all nodes below this child.
public: const GeoClusterNodeTree * FindNode
(
const Geo::s32 & linearIdx
) const
Locate a node with the given linear index in the tree.
public: const TreeNode< _Ty > * GetChild
(
Geo::s32 idx
) const
Get child with index 'idx', NULL if 'idx' is out of range.
public: TreeNode< _Ty > * GetChild
(
Geo::s32 idx
)
Get child with index 'idx', NULL if 'idx' is out of range.
public: Geo::s32 GetDepth() const
Get the depth of the node.
public: Geo::s32 GetLeaves
(
Geo::GeoArray< const TreeNode< _Ty > * > & leaves
) const
Fills in an array of all the leaf nodes underneath this node. Returns the total number of leaves in the resulting array.
protected: bool GetLevelFromRoot
(
Geo::GeoArray< TreeNode< _Ty > * > & levelNodes,
Geo::s32 level
)
Return an array of nodes at the given depth ordered from left to right in the tree.
public: bool GetLevelFromRoot
(
Geo::GeoArray< const TreeNode< _Ty > * > & levelNodes,
Geo::s32 level
) const
Return an array of nodes at the given depth ordered from left to right in the tree.
public: Geo::s32 GetNumChildren() const
Number of immediate children nodes.
public: Geo::s32 GetNumInternalNodes() const
Total number of internal nodes in the tree (i.e. not leaves)
public: Geo::s32 GetNumLevels() const
Get the number of levels in the tree.
public: Geo::s32 GetNumNodes() const
Total number of nodes in the tree.
public: Geo::s32 GetNumNodes
(
Geo::s32 level
) const
Total number of nodes in a given level.
public: const TreeNode< _Ty > * GetParent() const
Get the parent node, NULL if this is the root.
public: TreeNode< _Ty > * GetParent()
Get the parent node, NULL if this is the root.
public: const TreeNode< _Ty > * GetRoot() const
Get the root of the tree.
public: TreeNode< _Ty > * GetRoot()
Get the root of the tree.
public: const _Ty & GetValue() const
Get the value stored in the node.
public: _Ty & GetValue()
Get the value stored in the node.
public: bool IsLeaf() const
Returns whether this is a leaf node, i.e. has no children.
public: bool IsRoot() const
Returns whether this is a root node, i.e. has no parent.
public: bool Load
(
Geo::IGeoInputStream & reader
)
Load tree from disk.
public: GeoClusterNodeTree * Load
(
Geo::IGeoInputStream & reader
)
Loads object from the provided stream.
public: NonCopyable
(
NonCopyable &&
)
Defaulted to allow move.
public: NonCopyable & operator=
(
NonCopyable &&
)
Defaulted to allow move.
public: TreeNode< _Ty > * RemoveChild
(
Geo::s32 idx
)
Remove and return the child with index 'idx' from the tree.
public: bool Save
(
Geo::IGeoStream & writer
) const
Save tree to disk.
public: void SetValue
(
const _Ty & val
)
Set the value stored in the node.
public: TreeNode()
Constructor.