41 template <
class Element >
43 template <
class Element >
48 template <
typename Element >
49 INLINE std::ostream&
operator<<(std::ostream& out,
54 template <
typename Element >
55 INLINE std::ostream&
operator<<(std::ostream& out,
72 template <
class Element >
211 friend std::ostream& operator<<<>(std::ostream& out,
261 template <
class Element >
316 Element& operator[](
const unsigned int i);
324 const Element& operator[](
const unsigned int i)
const;
353 void pushFront(
const Element& e);
359 void pushBack(
const Element& e);
365 void insert(
const Element& e);
407 bool contains(
const Element& e)
const;
429 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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
HashTable< Element, SplayBinaryNode< Element > *> addr
The hash table to find quickly the position of a node.