The node class definition. This is a template of a class whose objects are used to build a tree of relationships between processed data.
More...
|
| | node (node< X1 > *const &prev, const data_addr &pos) |
| | This is the constructor designed to create the next node of the CMMTree.
|
| |
| | node () |
| | Dfefault constructor.
|
| |
| | node (node< X1 > const &)=delete |
| | Copy constructor.
|
| |
| node< X1 > & | operator= (node< X1 > const &)=delete |
| | Copy assignment operator.
|
| |
| | node (node< X1 > &&other) noexcept |
| | Move constructor.
|
| |
| node< X1 > & | operator= (node< X1 > &&other) noexcept |
| | Move assignment operator.
|
| |
| | ~node () |
| | Destructor.
|
| |
| bool | isNULLit (data_addr const &r) const |
| | This function is used when there is a need to check whether it is possible to use the data to which root refers.
|
| |
| void | add_new_node (data_addr const &pos) |
| | This function is used to create another CMMTree node.
|
| |
| size_t | node_level () const |
| | This function returns the level of the CMMTree where a given node is located.
|
| |
| data_addr const & | data_address () const |
| | This function returns the const_iterator to a vector<X1> element (dataset element).
|
| |
| data_addr & | data_address () |
| | This function returns the const_iterator to a vector<X1> element (dataset element).
|
| |
| void | data_on_path (std::vector< data_addr > &vec) const |
| | This function allows you to find a set of elements on a path - starting from the current node to the root.
|
| |
| node< X1 > *const & | parent_node_address () const |
| | This function returns the address of the parent node.
|
| |
| node< X1 > const * | this_node_address () const |
| | The function returns the address of the node calling this function.
|
| |
| size_t | children_number () const |
| | The function returns the number of children of a given node.
|
| |
| size_t | siblings_number () const |
| | The function returns the number of children of the parent of a given node.
|
| |
| void | change_children_capacity () const |
| | A function that reduces the size of the vector of parent's children's addresses - from capacity() to size().
|
| |
| node< X1 > *const & | operator[] (size_t i) const |
| | The index operator for a vector of children of a given node.
|
| |
| std::vector< node< X1 > * > const & | childrenVec () const |
| | Function that allows direct access to a child vector.
|
| |
| std::vector< node< X1 > * > & | childrenVec () |
| | Function that allows direct access to a child vector.
|
| |
| void | all_siblings_addresses (std::vector< const node< X1 > * > &vec) const |
| | This function allows you to obtain the addresses of all children of a parent.
|
| |
| X1 const & | node_value () const |
| | The function allows you to retrieve (for reading) the value of an element of the input data set to which a given node is associated.
.
|
| |
template<class X1>
class node< X1 >
The node class definition. This is a template of a class whose objects are used to build a tree of relationships between processed data.
- Template Parameters
-
| X1 | - a type parameter, that is, the type of input data being processed. |
Each node has three data members dedicated to storing addresses, and these are:
- the pointer to the parent node,
- pointer to the dynamic vector of the children node pointers,
- the iterator to a single element of the vector<X1> (input data vector).
Only the root node always has the null value (nullptr) for the pointer to the parent node.
Only the root may have the iterator (d_iterator) not assigned to the data, which in this case means that root does not represent any element of the input data vector. In this case CMMTree will describe not a single tree but a forest of trees.
For each other node of the CMMTree, the member d_iterator must point a specific element of the input data vector.
If the children pointer has a null value, the node is a leaf.
More information - see: https://ieeexplore.ieee.org/document/9069220
Definition at line 45 of file node.hpp.