38#include <gtest/gtest.h>
56 template <
class G,
class D,
class A>
66 return std::getenv(
"ALEPH_RUN_GRAPH_STRESS") !=
nullptr;
71 const char *
env = std::getenv(
"ALEPH_GRAPH_STRESS_NODES");
76 const unsigned long long v = std::strtoull(
env, &end, 10);
77 if (end ==
env || *end !=
'\0')
80 return static_cast<size_t>(v);
87 GTEST_SKIP() <<
"Set ALEPH_RUN_GRAPH_STRESS=1 (and optionally ALEPH_GRAPH_STRESS_NODES=N) to enable.";
93 std::vector<Node *>
nodes;
96 for (
size_t i = 0; i <
N; ++i)
99 for (
size_t i = 0; i + 1 <
N; ++i)
103 const bool found =
dij.paint_partial_min_paths_tree(g,
nodes.front(),
nodes.back());
106 const int dist =
dij.get_distance(
nodes.back());
Dijkstra's shortest path algorithm.
WeightedDigraph::Node Node
Generic directed graph (digraph) wrapper template.
Spanning tree calculation of all shortest paths from a given node according to Dijkstra's algorithm.
virtual Node * insert_node(Node *node) noexcept
Insertion of a node already allocated.
Arc * insert_arc(Node *src_node, Node *tgt_node, void *a)
DynArray< Graph::Node * > nodes
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
Default filter for filtered iterators on arcs.
Arc of graph implemented with double-linked adjacency lists.
Filtered iterator of adjacent arcs of a node.
Generic graph and digraph implementations.