| 34 | } |
| 35 | |
| 36 | DirectedGraph 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 | |
| 55 | DirectedGraph BuildDirectedCyclicGraph() |
| 56 | { |