Home | Trees | Indices | Help |
|
---|
|
Represent a directed graph with arbitrary objects as nodes.
This is used in the code
generator to determine order dependencies among components within a
namespace, and schema that comprise various namespaces. An edge from
source
to target
indicates that some aspect of
source
requires that some aspect of target
already be available.
|
|||
|
|||
|
|||
|
|||
set
|
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
__dfsOrder = None hash(x) |
|||
__roots = None hash(x) |
|||
__edgeMap = None hash(x) |
|||
__scc = None hash(x) |
|||
__sccMap = None hash(x) |
|||
__sccOrder = None hash(x) |
|
Add a directed edge from the The nodes are added to the graph if necessary. |
Return the set of nodes calculated to be roots (i.e., those that have no incoming edges). This caches the roots calculated in a previous invocation unless the
Note: Upon reset, any notes that had been manually added using addNode will no longer be in the set. |
Add the provided node as a root node, even if it has incoming edges. The node need not be present in the graph (if necessary, it is added). Note that roots added in this way do not survive a reset using roots.
|
Return the edges in the graph. The edge data structure is a map from the source node to the set of nodes that can be reached in a single step from the source. |
Return the edges in the graph. The edge data structure is a set of node pairs represented as |
Return the set of nodes in the graph. The node collection data structure is a set containing node objects, whatever they may be. |
Execute Tarjan's algorithm on the graph. Tarjan's algorithm computes the strongly-connected components of the graph: i.e., the sets of nodes that form a minimal closed set under edge transition. In essence, the loops. We use this to detect groups of components that have a dependency cycle.
|
Return the strongly-connected components of the graph. The data structure is a set, each element of which is itself a set containing one or more nodes from the graph. See Also: tarjan. |
Return a map from nodes to the strongly-connected component to which the node belongs.
See Also: tarjan. |
Return the strongly-connected components in order. The data structure is a list, in dependency order, of strongly connected components (which can be single nodes). Appearance of a node in a set earlier in the list indicates that it has no dependencies on any node that appears in a subsequent set. This order is preferred over dfsOrder for code generation, since it detects loops. See Also: tarjan. |
Return the strongly-connected component to which the given node belongs. Any keywords suppliend when invoking this method are passed to the sccMap method.
|
Return the nodes of the graph in depth-first-search order. The data structure is a list. Calculated lists are retained and
returned on future invocations, subject to the
|
Return the nodes of the graph as a sequence of root sets. The first root set is the set of nodes that are roots: i.e., have no incoming edges. The second root set is the set of nodes that have incoming nodes in the first root set. This continues until all nodes have been reached. The sets impose a partial order on the nodes, without being as constraining as sccOrder.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Apr 17 03:13:55 2013 | http://epydoc.sourceforge.net |