MCPcopy Create free account
hub / github.com/comaps/comaps / BuildDirectedGraph

Function BuildDirectedGraph

libs/routing/routing_tests/bfs_tests.cpp:36–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36DirectedGraph BuildDirectedGraph()
37{
38 DirectedGraph graph;
39
40 // Inserts edges in a format: <source, target, weight>.
41 graph.AddEdge(0, 4, kWeight);
42 graph.AddEdge(5, 4, kWeight);
43 graph.AddEdge(4, 1, kWeight);
44 graph.AddEdge(4, 3, kWeight);
45 graph.AddEdge(3, 2, kWeight);
46 graph.AddEdge(7, 4, kWeight);
47 graph.AddEdge(7, 6, kWeight);
48 graph.AddEdge(7, 8, kWeight);
49 graph.AddEdge(8, 9, kWeight);
50 graph.AddEdge(8, 10, kWeight);
51
52 return graph;
53}
54
55DirectedGraph BuildDirectedCyclicGraph()
56{

Callers 1

UNIT_TESTFunction · 0.85

Calls 1

AddEdgeMethod · 0.45

Tested by

no test coverage detected