1 # ifndef TPL_INDEXGRAPH
2 # define TPL_INDEXGRAPH
4 # include <tpl_indexNode.H>
5 # include <tpl_indexArc.H>
50 template <
class ,
class >
class Tree =
Treap>
55 typedef typename GT::Arc GT_Arc;
56 typedef typename GT::Node GT_Node;
57 typedef typename GT::Arc_Type GT_Arc_Type;
58 typedef typename GT::Node_Type GT_Node_Type;
93 const GT_Arc_Type & info = GT_Arc_Type())
94 throw (std::exception, std::domain_error)
96 if (idx_node.
search(src) == NULL)
97 throw std::domain_error(
"src node not in index");
99 if (idx_node.
search(tgt) == NULL)
100 throw std::domain_error(
"tgt node not in index");
113 return idx_node.
search(p);
127 return idx_node.
search(info);
139 return idx_arc.
search(src, tgt);
150 for (
typename GT::Node_Arc_Iterator it(p); it.has_current(); it.next())
151 idx_arc.
remove(it.get_current());
172 # endif // TPL_INDEXGRAPH
void remove(GT_Arc *e)
Elimina del índice el arco e.
Definition: tpl_indexArc.H:160
void remove_from_graph(GT_Node *p)
Definition: tpl_indexNode.H:177
Definition: tpl_indexGraph.H:51
GT_Node * search_node(GT_Node *p)
Definition: tpl_indexGraph.H:111
GT_Node * search_node(const GT_Node_Type &info)
Definition: tpl_indexGraph.H:125
Definition: tpl_treap.H:352
size_t get_num_nodes() const
Retorna el número de nodos que contiene el índice.
Definition: tpl_indexGraph.H:166
GT_Arc * insert_in_graph(GT_Node *src, GT_Node *tgt, const GT_Arc_Type &info)
Definition: tpl_indexArc.H:128
void remove_arc(GT_Arc *a)
Elimina del grafo y del índice el arco a.
Definition: tpl_indexGraph.H:157
size_t size() const
Retorna la cantidad de arcos que contiene el índice.
Definition: tpl_indexArc.H:230
GT_Arc * search_arc(GT_Node *src, GT_Node *tgt)
Definition: tpl_indexGraph.H:137
GT_Node * insert_node(const GT_Node_Type &info)
Definition: tpl_indexGraph.H:77
void remove_from_graph(GT_Arc *a)
Elimina del índice y del grafo el arco a.
Definition: tpl_indexArc.H:166
size_t size() const
Retorna la cantidad de arcos que contiene el índice.
Definition: tpl_indexNode.H:237
void remove_node(GT_Node *p)
Definition: tpl_indexGraph.H:146
GT_Node * search(GT_Node *p)
Definition: tpl_indexNode.H:136
Index_Graph(GT &g)
Crea un índice del grafo: los nodos y arcos son indizados.
Definition: tpl_indexGraph.H:66
GT_Arc * search(void *src, void *tgt)
Definition: tpl_indexArc.H:81
size_t get_num_arcs() const
Retorna el número de arcos que contiene el índice.
Definition: tpl_indexGraph.H:163
Definition: tpl_graph_indexes.H:13
GT_Node * insert_in_graph(const GT_Node_Type &info)
Definition: tpl_indexNode.H:92
GT_Arc * insert_arc(GT_Node *src, GT_Node *tgt, const GT_Arc_Type &info=GT_Arc_Type())
Definition: tpl_indexGraph.H:92