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

Function BuildUndirectedGraph

libs/routing/routing_tests/bfs_tests.cpp:17–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15double constexpr kWeight = 1.0;
16
17UndirectedGraph BuildUndirectedGraph()
18{
19 UndirectedGraph graph;
20
21 // Inserts edges in a format: <source, target, weight>.
22 graph.AddEdge(0, 4, kWeight);
23 graph.AddEdge(5, 4, kWeight);
24 graph.AddEdge(4, 1, kWeight);
25 graph.AddEdge(4, 3, kWeight);
26 graph.AddEdge(3, 2, kWeight);
27 graph.AddEdge(7, 4, kWeight);
28 graph.AddEdge(7, 6, kWeight);
29 graph.AddEdge(7, 8, kWeight);
30 graph.AddEdge(8, 9, kWeight);
31 graph.AddEdge(8, 10, kWeight);
32
33 return graph;
34}
35
36DirectedGraph BuildDirectedGraph()
37{

Callers 1

UNIT_TESTFunction · 0.85

Calls 1

AddEdgeMethod · 0.45

Tested by

no test coverage detected