1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

KCC: docstring for kcc.graph.kruskal()

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2015-05-08 12:25:12 +12:00 committed by Andrew Bartlett
parent 84fb4afe87
commit 6c760c1a0d

View File

@ -564,6 +564,15 @@ def add_int_edge(graph, internal_edges, examine, v1, v2):
def kruskal(graph, edges):
"""Perform Kruskal's algorithm using the given set of edges
The input edges are "internal edges" -- between red and black
nodes. The output edges are a minimal spanning tree.
:param graph: the graph object.
:param edges: a set of edges
:return: a tuple of a list of edges, and the number of components
"""
for v in graph.vertices:
v.edges = []