Package pyanaconda :: Module tsort
[hide private]
[frames] | no frames]

Module tsort

source code

Classes [hide private]
  CyclicGraphError
Functions [hide private]
 
tsort(graph) source code
 
create_graph(items, edges)
Create a graph based on a list of items and a list of edges.
source code
Function Details [hide private]

create_graph(items, edges)

source code 
Create a graph based on a list of items and a list of edges.

Arguments:

    items   -   an iterable containing (hashable) items to sort
    edges   -   an iterable containing (parent, child) edge pair tuples

Return Value:

    The return value is a dictionary representing the directed graph.
    It has three keys:

        items is the same as the input argument of the same name
        edges is the same as the input argument of the same name
        incoming is a dict of incoming edge count hashed by item