MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / main

Function main

examples/graphs/graph/graph_5.cpp:6–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4std::vector<std::pair<size_t, size_t>> get_edges();
5
6int main() {
7 using namespace matplot;
8 auto edges = get_edges();
9 auto g = graph(edges);
10 g->layout_algorithm(network::layout::force);
11
12 for (int i = 0; i < 300; ++i) {
13 g->layout_iterations(i);
14 std::this_thread::sleep_for(std::chrono::milliseconds(100));
15 }
16
17 show();
18 return 0;
19}
20
21std::vector<std::pair<size_t, size_t>> get_edges() {
22 return {

Callers

nothing calls this directly

Calls 5

showFunction · 0.85
layout_algorithmMethod · 0.80
layout_iterationsMethod · 0.80
get_edgesFunction · 0.70
graphFunction · 0.50

Tested by

no test coverage detected