Package flumotion :: Package common :: Module dag
[hide private]

Module dag

source code

directed acyclic graph implementation. Directed Acyclic Graph class and functionality

Version: $Rev: 6982 $

Classes [hide private]
A cycle was detected during execution of a function.
I represent a Node in a Graph.
I represent a Directed Acyclic Graph.
Functions [hide private]
topological_sort(items, partial_order)
Perform topological sort.
source code
Function Details [hide private]

topological_sort(items, partial_order)

source code 

Perform topological sort.

  • items - list of items
  • partial_order - list of pairs. If pair (a,b) is in it, it means that item a should appear before item b.
list of the items in one of the possible orders. Raises DAG.CycleError if partial_order contains a loop.