1 # ifndef TPL_INDEXNODE_H
2 # define TPL_INDEXNODE_H
4 # include <tpl_dynSetTree.H>
5 # include <tpl_graph.H>
16 operator () (
typename GT::Node * p1,
typename GT::Node * p2)
const
18 return p1->get_info() < p2->get_info();
58 template <
class ,
class >
class Tree =
Treap,
64 typedef typename GT::Node GT_Node;
65 typedef typename GT::Node_Type GT_Node_Type;
94 GT_Node * ret_val = g.insert_node(info);
104 g.remove_node(ret_val);
112 GT_Node * ret_val = g.insert_node(std::move(info));
122 g.remove_node(ret_val);
138 GT_Node ** ret_val = index.
search(p);
157 GT_Node *
search(
const GT_Node_Type & info)
159 GT_Node dummy_node(info);
160 GT_Node * dummy_node_ptr = &dummy_node;
162 return search(dummy_node_ptr);
166 void remove(GT_Node * p)
195 GT_Node * p = it.get_curr();
226 IndexNode(GT & __g, SN && __sn = SN()) : g(__g), sn(__sn)
231 IndexNode(GT & __g, SN & __sn) : g(__g), sn(__sn)
GT_Node * search(const GT_Node_Type &info)
Definition: tpl_indexNode.H:157
void remove_from_graph(GT_Node *p)
Definition: tpl_indexNode.H:177
size_t remove(const Key &key)
Definition: tpl_dynSetTree.H:274
const size_t & size() const
Retorna la cardinalidad del conjunto.
Definition: tpl_dynSetTree.H:408
void clear_index()
Borra el índice; todos los nodos son eliminados.
Definition: tpl_indexNode.H:185
Definition: tpl_treap.H:352
Key * search(const Key &key) const
Definition: tpl_dynSetTree.H:364
Definition: tpl_graph.H:794
void clear_graph()
Elimina todos los nodos del grafo y del índice.
Definition: tpl_indexNode.H:203
Key & find(const Key &key)
Definition: tpl_dynSetTree.H:316
void next()
Adelanta el iterador una posición.
Definition: filter_iterator.H:143
GT_Node * insert(GT_Node *p)
Definition: tpl_indexNode.H:79
size_t size() const
Retorna la cantidad de arcos que contiene el índice.
Definition: tpl_indexNode.H:237
Definition: tpl_indexNode.H:60
Definition: tpl_graph.H:814
void build_index()
Inserta todos los nodos del grafo en el índice.
Definition: tpl_indexNode.H:191
GT_Node * search(GT_Node *p)
Definition: tpl_indexNode.H:136
GT_Node * insert_in_graph(GT_Node_Type &&info=GT_Node_Type())
Definition: tpl_indexNode.H:110
IndexNode(GT &__g, SN &&__sn=SN())
Definition: tpl_indexNode.H:226
void empty()
Elimina todos los elementos del conjunto.
Definition: tpl_dynSetTree.H:112
Key * put(const Key &key)
Seudo sinonimo de insert; no retorna ningún valor.
Definition: tpl_dynSetTree.H:257
Definition: tpl_graph_indexes.H:13
GT_Node * insert_in_graph(const GT_Node_Type &info)
Definition: tpl_indexNode.H:92