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

Method add_edge

code/graph/dinic.cpp:12–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10 memset(head = new int[n], -1, n*sizeof(int)); }
11 void reset() { e = e_store; }
12 void add_edge(int u, int v, int uv, int vu=0) {
13 e.push_back(edge(v,uv,head[u])); head[u]=(int)size(e)-1;
14 e.push_back(edge(u,vu,head[v])); head[v]=(int)size(e)-1;}
15 int augment(int v, int t, int f) {
16 if (v == t) return f;
17 for (int &i = curh[v], ret; i != -1; i = e[i].nxt)

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
edgeClass · 0.70

Tested by

no test coverage detected