38 template <
class Element >
40 template <
class Element >
45 template <
typename Element >
46 INLINE std::ostream&
operator<<(std::ostream& out,
51 template <
typename Element >
52 INLINE std::ostream&
operator<<(std::ostream& out,
69 template <
class Element >
208 friend std::ostream& operator<<<>(std::ostream& out,
258 template <
class Element >
313 Element& operator[](
const unsigned int i);
321 const Element& operator[](
const unsigned int i)
const;
350 void pushFront(
const Element& e);
356 void pushBack(
const Element& e);
362 void insert(
const Element& e);
404 bool contains(
const Element& e)
const;
426 friend std::ostream& operator<<<>(std::ostream& out,
SplayBinaryNode * pere
The father, nullptr for the root.
SplayBinaryNode< Element > * zag()
A left rotation, the node must hava a father.
const Element & getElement() const
Returns the element in the node.
const SplayBinaryNode< Element > * getFg() const
Returns the left child.
SplayBinaryNode< Element > * splay()
A splay rotation, the node will be the root of the tree.
Template implementation of splay trees.
SplayBinaryNode(const Element &e, HashTable< Element, SplayBinaryNode< Element > * > &addr, SplayBinaryNode *g=0, SplayBinaryNode *d=0, SplayBinaryNode *p=0)
Basic constructor: creates a node with a reference to the element.
~SplayBinaryNode()
Class destructor.
void _copy(const SplayBinaryNode< Element > &from, HashTable< Element, SplayBinaryNode< Element > * > &addr)
A function used to perform copies.
gum is the global namespace for all aGrUM entities
std::vector< std::string > split(const std::string &str, const std::string &delim)
Split str using the delimiter.
SplayBinaryNode< Element > * root
Root of the tree.
The class for generic Hash Tables.
Size size
The size of the sub-tree.
SplayBinaryNode * fg
The left child.
std::ostream & operator<<(std::ostream &output, const BayesNet< GUM_SCALAR > &bn)
Prints map's DAG in output using the Graphviz-dot format.
const SplayBinaryNode< Element > * getFd() const
Returns the right child.
SplayBinaryNode< Element > * join(const SplayBinaryNode< Element > *e, HashTable< Element, SplayBinaryNode< Element > * > &addr)
Concatenation of two trees.
SplayBinaryNode * fd
The right child.
SplayBinaryNode< Element > * zig()
A right rotation, the node must have a father.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
int position() const
Position of the node.
Class hash tables iterators.
HashTable< Element, SplayBinaryNode< Element > *> addr
The hash table to find quickly the position of a node.