MCPcopy Create free account
hub / github.com/algorithmzuo/algorithm-journey / connect

Method connect

src/class201/Code07_Network1.java:182–189  ·  view source on GitHub ↗
(int c, int x, int y)

Source from the content-addressed store, hash-verified

180 }
181
182 public static void connect(int c, int x, int y) {
183 int u = node(c, x);
184 int v = node(c, y);
185 nodeDegree[u]++;
186 nodeDegree[v]++;
187 link(u, v);
188 edgeColor.put(edge(x, y), c);
189 }
190
191 public static void disconnect(int c, int x, int y) {
192 int u = node(c, x);

Callers 2

updateEdgeMethod · 0.95
mainMethod · 0.95

Calls 4

nodeMethod · 0.95
linkMethod · 0.95
edgeMethod · 0.95
putMethod · 0.45

Tested by

no test coverage detected