forked from mrexodia/matplotplusplus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraph_6.cpp
More file actions
28 lines (24 loc) 路 952 Bytes
/
Copy pathgraph_6.cpp
File metadata and controls
28 lines (24 loc) 路 952 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
#include <thread>
#include <matplot/matplot.h>
std::vector<std::pair<size_t, size_t>> get_edges();
int main() {
using namespace matplot;
using namespace std;
vector<pair<size_t, size_t>> edges = {{0, 1},
{0, 2},
{1, 2},
{1, 4},
{2, 3},
{3, 5},
{4, 5},
{4, 6},
{6, 8},
{8, 9},
{7, 9},
{8, 7},
{9, 10}};
std::vector<double> weights = {4,4,2,1,1,4,2,1,3,3,2,4,1};
graph(edges)->edge_labels(weights);
wait();
return 0;
}