-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen.cpp
More file actions
39 lines (26 loc) · 772 Bytes
/
gen.cpp
File metadata and controls
39 lines (26 loc) · 772 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
// (C) 2014 Arek Olek
#include <iostream>
#include <boost/graph/adjacency_list.hpp>
#include "debug.hpp"
#include "options.hpp"
#include "test_suite.hpp"
#include "range.hpp"
using namespace std;
typedef boost::adjacency_list<
boost::hash_setS, boost::vecS, boost::undirectedS
> graph;
int main(int argc, char** argv) {
options opt(argc, argv);
int z = opt.get<int>("-z", 1);
int n = opt.get<int>("-n", 5);
float p = opt.get<float>("-p", 1);
test_suite<graph> suite("gnp", z, n, p);
cout << suite.size() << endl;
for(auto const& G : suite) {
show("tego.dot", G, G);
cout << num_vertices(G) << " " << num_edges(G) << endl;
for(auto e : range(edges(G)))
cout << source(e, G) << " " << target(e, G) << endl;
}
return 0;
}