forked from cp-algorithms/cp-algorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_dijkstra_sparse.cpp
More file actions
39 lines (35 loc) · 835 Bytes
/
test_dijkstra_sparse.cpp
File metadata and controls
39 lines (35 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <cassert>
#include <vector>
#include <set>
#include <algorithm>
#include <queue>
using namespace std;
namespace Set{
#include "dijkstra_sparse_set.h"
}
namespace PriorityQueue {
#include "dijkstra_sparse_pq.h"
}
#include "data/sssp.h"
int main() {
{
using namespace Set;
for (auto const& graph : sssp_graphs) {
adj = graph.adj;
vector<int> d, p;
dijkstra(graph.s, d, p);
assert(d == graph.expected_d);
assert(p == graph.expected_p);
}
}
{
using namespace PriorityQueue;
for (auto const& graph : sssp_graphs) {
adj = graph.adj;
vector<int> d, p;
dijkstra(graph.s, d, p);
assert(d == graph.expected_d);
assert(p == graph.expected_p);
}
}
}