38#include <gtest/gtest.h>
86 auto * n1 = g.insert_node(1);
87 auto * n2 = g.insert_node(2);
89 auto *
a12 =
arcs.insert_in_graph(n1, n2, 5);
104 auto *
a12 =
arcs.insert_in_graph(n1, n2, 5);
119 auto *
a12 =
arcs.insert_in_graph(n1, n2, 5);
Builds an arc index for fast lookup by source/target nodes.
Generic directed graph (digraph) wrapper template.
Graph implemented with double-linked adjacency lists.
virtual Node * insert_node(Node *node) noexcept
Insertion of a node already allocated.
Builds a node index for fast lookup and retrieval.
GT_Node * search_or_insert_in_graph(GT_Node *p)
Searches for a node in the index and graph, inserting it if not found.
void remove_from_graph(GT_Node *p)
Removes a node from the graph and index.
GT_Node * insert_in_graph(GT_Node *p)
Inserts a node into the graph and index.
GT_Node * search(GT_Node *p)
Searches for a node by its content.
DynArray< Graph::Arc * > arcs
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Arc of graph implemented with double-linked adjacency lists.
Generic graph and digraph implementations.
Graph node and arc indexing.