73# ifndef TPL_INDEXNODE_H
74# define TPL_INDEXNODE_H
125 template <
class GT,
class Compare = Dft_Node_Cmp<GT>,
126 template <
class ,
class >
class Tree =
Treap,
256 GT_Node * p = it.get_curr_ne();
Exception handling system with formatted messages for Aleph-w.
Dynamic set backed by balanced binary search trees with automatic memory management.
void next_ne() noexcept
Advances the iterator to the next filtered element (noexcept version).
Builds an index of nodes for fast search and retrieval.
void remove_from_graph(GT_Node *p)
Removes the node p from the graph and the index.
GT::Node_Type GT_Node_Type
GT_Node * search(const GT_Node_Type &info)
Searches for a node based on the info.
void remove(GT_Node *p)
Removes the node at address p from the index.
void clear_index()
Clears the index; all nodes are removed from it.
GT_Node * insert_in_graph(GT_Node_Type &&info)
GT_Node * search(GT_Node *p)
Searches for a node based on the content of p.
IndexNode(GT &__g, SN __sn=SN())
Creates an index from the nodes inserted in the graph.
GT_Node * insert(GT_Node *p)
Inserts the node p into the index.
void build_index()
Inserts all nodes from the graph into the index.
GT_Node * insert_in_graph(const GT_Node_Type &info)
Creates a new node with generic content info, inserts it into the graph, and then into the index.
void clear_graph()
Removes all nodes from the graph and the index.
size_t size() const
Returns the number of items contained in the index.
DynSetTree< GT_Node *, Tree, Compare > index
virtual Node * insert_node(Node *node) noexcept
Insertion of a node already allocated.
virtual void remove_node(Node *node) noexcept
Remove a node from the graph and free its memory.
typename Node::Node_Type Node_Type
The arc class type.
Filtered iterator on the nodes of a graph.
NodeInfo & get_info() noexcept
Return a modifiable reference to the data contained in the node.
void clear_graph(GT &g) noexcept
Clean a graph: all its nodes and arcs are removed and freed.
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Default node comparison class for Nodes_Index.
bool operator()(typename GT::Node *p1, typename GT::Node *p2) const
Comparison operator.
Default filter for the graph nodes.
Treap (a special type of randomized binary search tree) using nodes without virtual destructor.
Dynamic set implementations based on balanced binary search trees.
Generic graph and digraph implementations.