|
Data & | get_data (const Key &key) |
|
const Key & | get_key (Data *data_ptr) |
|
Key * | insert (const Key &key, const Data &data) |
|
Key * | insert (const Key &key, Data &&data=Data()) |
|
Key * | insert (Key &&key, const Data &data) |
|
Key * | insert (Key &&key, Data &&data=Data()) |
|
Key * | search_or_insert (const Key &key, const Data &data) |
|
Data * | search_or_insert (const Key &key, Data &&data) |
|
Data * | search_or_insert (Key &&key, const Data &data) |
|
Data * | search_or_insert (Key &&key, Data &&data) |
|
Key * | put (const Key &key, const Data &data) |
|
Key * | put (const Key &key, Data &&data) |
|
Key * | put (Key &&key, const Data &data) |
|
Key * | put (Key &&key, Data &&data) |
|
size_t | remove (const Key &key) |
|
bool | test_key (const Key &key) const |
| Retorna true si key está presente dentro del mapeo.
|
|
bool | has (const Key &key) const |
|
Data * | test (const Key &key) |
|
Data * | search (const Key &key) const |
|
Data & | find (const Key &key) |
|
| Map_Sequences_Methods () |
|
| Generate_Proxy_Operator (DynMapTree) |
|
void | swap (DynSetTree &dset) |
|
| DynSetTree (Dft_Pair_Cmp< Key, Data, Compare > &&cmp=Dft_Pair_Cmp< Key, Data, Compare >()) |
| Instancia un conjunto dinámico vacío.
|
|
| DynSetTree (Dft_Pair_Cmp< Key, Data, Compare > &cmp) |
|
| DynSetTree (const DynSetTree &srcTree) |
| Instancia un conjunto dinámico copia de srcTree.
|
|
| DynSetTree (const DynList< std::pair< Key, Data > > &list) |
|
| DynSetTree (DynSetTree &&srcTree) |
|
void | empty () |
| Elimina todos los elementos del conjunto.
|
|
DynSetTree & | operator= (const DynList< std::pair< Key, Data > > &list) |
|
DynSetTree & | operator= (const DynSetTree &srcTree) |
| Asigna a this el conjunto dinámico srcTree.
|
|
DynSetTree & | operator= (DynSetTree &&srcTree) |
| Asigna a this el conjunto dinámico srcTree.
|
|
virtual | ~DynSetTree () |
| Destructor; todos los elementos son liberados.
|
|
std::pair< Key, Data > * | insert (const std::pair< Key, Data > &key) |
|
std::pair< Key, Data > * | insert (std::pair< Key, Data > &&key) |
|
std::pair< Key, Data > * | append (const std::pair< Key, Data > &key) |
|
std::pair< Key, Data > * | append (std::pair< Key, Data > &&key) |
|
std::pair< Key, Data > * | search_or_insert (const std::pair< Key, Data > &key) |
|
std::pair< Key, Data > * | search_or_insert (std::pair< Key, Data > &&key) |
|
std::pair< Key, Data > * | insert_dup (const std::pair< Key, Data > &key) |
|
std::pair< Key, Data > * | insert_dup (std::pair< Key, Data > &&key) |
|
std::pair< Key, Data > * | put (const std::pair< Key, Data > &key) |
| Seudo sinonimo de insert; no retorna ningún valor.
|
|
std::pair< Key, Data > * | put (std::pair< Key, Data > &&key) |
|
size_t | remove (const std::pair< Key, Data > &key) |
|
bool | exist (const std::pair< Key, Data > &key) const |
| Retorna true si key pertenece al conjunto dinámico.
|
|
bool | has (const std::pair< Key, Data > &key) const |
|
bool | contains (const std::pair< Key, Data > &key) const |
|
std::pair< Key, Data > & | find (const std::pair< Key, Data > &key) throw (std::exception, std::domain_error) |
|
std::pair< int, std::pair< Key,
Data > * > | find_position (const std::pair< Key, Data > &key) const |
|
std::pair< Key, Data > * | search (const std::pair< Key, Data > &key) const throw (std::exception, std::domain_error) |
|
const std::pair< Key, Data > & | min () const |
|
const std::pair< Key, Data > & | get_first () |
|
const std::pair< Key, Data > & | max () const |
|
const std::pair< Key, Data > & | get_last () |
|
const std::pair< Key, Data > & | get () |
| Sinónimo de max.
|
|
const size_t & | size () const |
| Retorna la cardinalidad del conjunto.
|
|
bool | is_empty () const |
| Retorna true si el conjunto está vacío.
|
|
size_t | internal_path_length () const |
|
Node * | get_root_node () const |
|
const std::pair< Key, Data > & | get_root () const |
|
size_t | height () const |
| Calcula y retorna la altura del árbol binario de búsqueda.
|
|
void | for_each_in_preorder (void(*visitFct)(Node *, int, int)) |
|
long | position (const std::pair< Key, Data > &key) const |
|
std::pair< Key, Data > & | select (const size_t &i) |
|
const std::pair< Key, Data > & | select (const size_t &i) const |
|
std::pair< Key, Data > & | operator() (const size_t &i) |
|
std::pair< Key, Data > & | access (const size_t &i) |
|
bool | verify () |
|
void | for_each_preorder (Key_Op &key_op) |
|
void | for_each_preorder (Key_Op &&key_op=Key_Op()) |
|
void | for_each_inorder (Key_Op &key_op) |
|
void | for_each_inorder (Key_Op &&key_op=Key_Op()) |
|
void | for_each_postorder (Key_Op &key_op) |
|
void | for_each_postorder (Key_Op &&key_op=Key_Op()) |
|
DynSetTree & | join (DynSetTree &t, DynSetTree &dup) |
|
DynSetTree & | join (DynSetTree &t, DynSetTree &&dup=DynSetTree()) |
|
DynSetTree & | join_dup (DynSetTree &t) |
|
bool | split_key (const std::pair< Key, Data > &key, DynSetTree &l, DynSetTree &r) |
|
void | split_pos (const size_t pos, DynSetTree &l, DynSetTree &r) |
|
void | split_key_dup (const std::pair< Key, Data > &key, DynSetTree &l, DynSetTree &r) |
|
bool | traverse (Operation &op) |
|
bool | traverse (Operation &&op=Operation()) |
|
bool | traverse (Operation &op) const |
|
bool | traverse (Operation &&op=Operation()) const |
|
| Functional_Methods (std::pair< Key, Data >) |
|
| Generic_Keys (std::pair< Key, Data >) |
|
| Equal_To_Method (DynSetTree) |
|
template<typename Key, typename Data, template< typename, class > class Tree = Avl_Tree, class Compare = Aleph::less<Key>>
class Aleph::DynMapTree< Key, Data, Tree, Compare >
Mapeo genérico instrumentado con árboles binarios de búsqueda.
DynMapTree define un mapeo entre un conjunto de claves, que no se pueden repetir, y un conjunto rango. El mapeo se implanta mediante alguna clase de árbol binario de búsqueda definido como parámetros tipo.
Los parámetros tipo de esta clase se definen del siguiente modo:
- Tree: la clase de árbol binario de búsqueda con que se desea instrumentar el mapeo. Los posibles tipos son BinTree Avl_Tree Splay_Tree Rb_Tree Treap y Rand_Tree.
- Key: tipo de clave de indización. También se le dice "dominio" del mapeo.
- Data: tipo del rango.
- Compare: criterio de comparación entre las claves.
Los elementos del mapeo pueden accederse mediante el operador [] colocando como parámetro la clave de indización.
- Ver también
- BinTree Avl_Tree Splay_Tree Rb_Tree Treap Rand_Tree