MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / flow_network

Method flow_network

code/graph/edmonds_karps.cpp:8–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6 : v(_v), nxt(_nxt), cap(_cap) { } };
7 int n, *head; vector<edge> e, e_store;
8 flow_network(int _n) : n(_n) {
9 memset(head = new int[n], -1, n*sizeof(int)); }
10 void reset() { e = e_store; }
11 void add_edge(int u, int v, int uv, int vu=0) {
12 e.push_back(edge(v,uv,head[u])); head[u]=(int)size(e)-1;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected