48#ifndef GUM_INDEXED_TREE_H
49#define GUM_INDEXED_TREE_H
72 template <
typename Key,
typename Data >
149 void insertNode(
const std::vector< Key >& index,
const Data*
data);
160 void insertNode(
const std::vector< Key >& index,
const Data&
data);
169 void setNode(
const std::vector< Key >& index, Data*
data);
178 void setNode(
const std::vector< Key >& index,
const Data&
data);
188 Data&
getData(
const std::vector< Key >& index)
const;
216 template <
typename Key,
typename Data >
The class for generic Hash Tables.
The class for storing the nodes of the Arborescence.
void insertNode(const std::vector< Key > &index, const Data *data)
Adds a new node into the tree.
Data * data
The data stored into the node.
~IndexedTree()
Class destructor.
void setNode(const std::vector< Key > &index, Data *data)
Updates the value of a node (or adds it if it does not already exist).
Data & getData(const std::vector< Key > &index) const
Returns the value of a given node of the tree.
HashTable< Key, IndexedTree< Key, Data > * > children
The list of children nodes of the current node.
Key key
The key of the current node.
IndexedTree< Key, Data > * parent
The parent of the node.
IndexedTree< Key, Data > & getNode(const std::vector< Key > &index) const
Returns a given node of the tree.
IndexedTree< Key, Data > & operator=(const IndexedTree< Key, Data > &from)
Copy operator.
IndexedTree(Data *data=nullptr)
Creates a tree with one node with or without data.
Class hash tables iterators.
Implementation of tree data structures.
gum is the global namespace for all aGrUM entities
std::ostream & operator<<(std::ostream &stream, const AVLTree< Val, Cmp > &tree)
display the content of a tree