MCPcopy Create free account
hub / github.com/cp-algorithms/cp-algorithms / get_adj

Method get_adj

test/data/flow_networks.h:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7 int maxflow;
8
9 vector<vector<int>> get_adj() {
10 int n = capacity.size();
11 vector<vector<int>> adj(n);
12 for (int i = 0; i < n; i++) {
13 for (int j = 0; j < n; j++) {
14 if (capacity[i][j] || capacity[j][i])
15 adj[i].push_back(j);
16 }
17 }
18 return adj;
19 }
20};
21
22vector<FlowNetwork> flow_networks = {

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by 1

mainFunction · 0.64