28 #ifndef GUM_INDEXED_TREE_H 29 #define GUM_INDEXED_TREE_H 33 #include <agrum/agrum.h> 34 #include <agrum/tools/core/hashTable.h> 51 template <
typename Key,
typename Data >
67 IndexedTree(Data* data =
nullptr);
82 IndexedTree(
const Key& theKey, Data* data =
nullptr);
93 IndexedTree(
const Key& theKey,
const Data& data);
99 IndexedTree(
const IndexedTree< Key, Data >& from);
106 IndexedTree< Key, Data >& operator=(
const IndexedTree< Key, Data >& from);
128 void insertNode(
const std::vector< Key >& index,
const Data* data);
139 void insertNode(
const std::vector< Key >& index,
const Data& data);
148 void setNode(
const std::vector< Key >& index, Data* data);
157 void setNode(
const std::vector< Key >& index,
const Data& data);
167 Data& getData(
const std::vector< Key >& index)
const;
176 IndexedTree< Key, Data >& getNode(
const std::vector< Key >& index)
const;
188 IndexedTree< Key, Data >* parent;
191 HashTable< Key, IndexedTree< Key, Data >* > children;
195 template <
typename Key,
typename Data >
196 std::ostream& operator<<(std::ostream&,
const IndexedTree< Key, Data >&);
201 #include <agrum/tools/core/indexedTree_tpl.h>