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

Method add_edge

code/graph/edmonds_karps.cpp:11–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;
13 e.push_back(edge(u,vu,head[v])); head[v]=(int)size(e)-1;}
14 int max_flow(int s, int t, bool res=true) {
15 e_store = e;
16 int l, r, v, f = 0;

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
edgeClass · 0.70

Tested by

no test coverage detected