Trees | Index | Help |
---|
Package flumotion :: Package common :: Module dag :: Class DAG |
|
Loggable
--+
|
DAG
I represent a Directed Acyclic Graph.
You can add objects to me as Nodes and then express dependency by adding edges.Method Summary | |
---|---|
__init__(self)
| |
I add an edge between two nodes in the DAG. | |
I add a node to the DAG. | |
list of object |
I return all the objects with node type specified by type |
list of objects |
I return a list of objects that are ancestors of this object,objtype. |
list of (object,Integer) |
I return a list of (object, type) tuples that are ancestors of this object,objtype. |
list of objects |
I return a list of objects that are direct children of this object,objtype. |
list of (object, object) |
I return a list of (object, type) tuples that are direct children of this object,objtype. |
list of objects |
I return a list of objects that are offspring of this object,objtype. |
list of (object,Integer) |
I return a list of (object, type) tuples that are offspring of this object,objtype. |
list of (object, object) |
I return a list of objects that are direct parents of this object, objtype. |
list of (object, object) |
I return a list of (object, type) tuples that are direct parents of this object, objtype. |
I return whether or not the graph has a cycle. | |
Boolean |
I check if a node exists in the DAG. |
Boolean |
I return whether the object is floating: no parents and no children. |
I remove an edge between two nodes in the DAG. | |
I remove a node that exists in the DAG. | |
list of (object, type) |
I return a topologically sorted list of objects. |
Inherited from Loggable | |
Log a debug message. | |
dict |
Log a message at the given level, with the possibility of going higher up in the stack. |
Log an error. | |
Log an informational message. | |
Log a log message. | |
Overridable log function. | |
Overridable object name function. | |
Log a warning. | |
Log a warning about a Failure. |
Class Variable Summary | |
---|---|
Inherited from Loggable | |
Implements |
__implemented__ = <implementedBy flumotion.common.log.Lo...
|
ClassProvides |
__providedBy__ = <zope.interface.declarations.ClassProvi...
|
ClassProvides |
__provides__ = <zope.interface.declarations.ClassProvide...
|
str |
logCategory : Implementors can provide a category to log their messages under. |
Method Details |
---|
addEdge(self, parent, child, parenttype=0, childtype=0)I add an edge between two nodes in the DAG.
|
addNode(self, object, type=0)I add a node to the DAG.
|
getAllNodesByType(self, type)I return all the objects with node type specified by type
|
getAncestors(self, object, objtype=0, *types)I return a list of objects that are ancestors of this object,objtype.
|
getAncestorsTyped(self, object, objtype=0, *types)I return a list of (object, type) tuples that are ancestors of this object,objtype.
|
getChildren(self, object, objtype=0, types=None)I return a list of objects that are direct children of this object,objtype.
|
getChildrenTyped(self, object, objtype=0, types=None)I return a list of (object, type) tuples that are direct children of this object,objtype.
|
getOffspring(self, object, objtype=0, *types)I return a list of objects that are offspring of this object,objtype.
|
getOffspringTyped(self, object, objtype=0, *types)I return a list of (object, type) tuples that are offspring of this object,objtype.
|
getParents(self, object, objtype=0, types=None)I return a list of objects that are direct parents of this object, objtype.
|
getParentsTyped(self, object, objtype=0, types=None)I return a list of (object, type) tuples that are direct parents of this object, objtype.
|
hasCycle(self)I return whether or not the graph has a cycle. If it has, some operations on it will fail and raise CycleError. |
hasNode(self, object, type=0)I check if a node exists in the DAG.
|
isFloating(self, object, objtype=0)I return whether the object is floating: no parents and no children.
|
removeEdge(self, parent, child, parenttype=0, childtype=0)I remove an edge between two nodes in the DAG.
|
removeNode(self, object, type=0)I remove a node that exists in the DAG. I also remove any edges pointing to this node.
|
sort(self)I return a topologically sorted list of objects.
|
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Fri Feb 2 11:44:37 2007 | http://epydoc.sf.net |