Package flumotion :: Package common :: Module dag
[show private | hide private]
[frames | no frames]

Module flumotion.common.dag

Directed Acyclic Graph class and functionality
Classes
DAG I represent a Directed Acyclic Graph.
Node I represent a Node in a Graph.

Exceptions
CycleError A cycle was detected during execution of a function.

Function Summary
  topological_sort(items, partial_order)
Perform topological sort.

Function Details

topological_sort(items, partial_order)

Perform topological sort.
Parameters:
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.
Returns:
list of the items in one of the possible orders. Raises DAG.CycleError if partial_order contains a loop.

Generated by Epydoc 2.1 on Fri Feb 2 11:44:38 2007 http://epydoc.sf.net