Skip to content

Commit fc3559e

Browse files
authored
Merge pull request #481 from Saloni-2005/week-11-bandwidth
Week 11 bandwidth
2 parents 0800c10 + c29e5a3 commit fc3559e

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

docqueries/metrics/bandwidth.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ FROM edges'
99
);
1010
bandwidth
1111
-----------
12-
13
12+
5
1313
(1 row)
1414

1515
/* -- q2 */
@@ -54,7 +54,7 @@ SELECT * FROM pgr_bandwidth(
5454
);
5555
bandwidth
5656
-----------
57-
6
57+
8
5858
(1 row)
5959

6060
/* -- q5 */
@@ -99,7 +99,7 @@ SELECT * FROM pgr_bandwidth(
9999
);
100100
bandwidth
101101
-----------
102-
6
102+
5
103103
(1 row)
104104

105105
/* -- q8 */

src/metrics/metrics_driver.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ do_metrics(
7070

7171
hint = "";
7272

73-
pgrouting::UndirectedGraph undigraph;
73+
auto vertices(pgrouting::extract_vertices(edges));
74+
pgrouting::UndirectedGraph undigraph(vertices);
75+
7476
undigraph.insert_edges(edges);
7577

7678
uint64_t result = 0;

0 commit comments

Comments
 (0)