394
правки
Изменения
→Реализация
|-
|
Graph Boruvka(<tex>Graph G</tex>)
while (T.size < n) for (uv принадлежащим <tex>\in</tex> E)
if (u.color != v.color)
if (min_edgeminEdge[u.color] < uv.w) min_edgeminEdge[u.color] = uv.w if (min_edgeminEdge[v.color] < uv.w) min_edgeminEdge[v.color] = uv.w) for (color) T.addEdge(minEdge[color]) for (u <tex>\in</tex> G) dfs(u, color++) return T;
|}