This is an example of how to use a adjacency-list graph data structure with Metall.
#include <iostream>
using vid_t = uint64_t;
using adj_list_graph_t =
{
adj_list_graph_t *adj_list_graph =
manager.construct<adj_list_graph_t>(
"adj_list_graph")(
adj_list_graph->add_edge(1, 2);
}
{
adj_list_graph_t *adj_list_graph =
manager.find<adj_list_graph_t>(
"adj_list_graph").first;
adj_list_graph->add_edge(1, 3);
for (auto edge = adj_list_graph->edges_begin(1);
edge != adj_list_graph->edges_end(1); ++edge) {
std::cout << "1 " << *edge << std::endl;
}
}
return 0;
}
Simple adjacency-list graph data structure that can take a custom C++ allocator and be stored in pers...
Definition: adjacency_list.hpp:23
int main()
Definition: jgraph.cpp:24