KCC: docstring for kcc.graph.kruskal()
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 8 May 2015 00:25:12 +0000 (12:25 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 12 Jun 2015 04:57:16 +0000 (06:57 +0200)
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>
python/samba/kcc/graph.py

index f951c52dcb4a129fa2953f66fbbb79411d480bd4..8b8ee1fbafd7d64f67380a1a5236972e977ff62c 100644 (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 = []