Paths are enumerated threads through a particular graph. They are
implemented as an optimized hierarchical graph using python primitives to
save memory and processing time...
Each "leaf" node may be tracked back for it's entire path by
tracking back to parents.
|
newPathNode(parent=None,
**kwargs)
Create a new path node with the given properties |
source code
|
|
|
|
|
delPathNode(pnode)
Prune (remove) this node from the parent... |
source code
|
|
|
|
|
|
|
|
|
|
|
getPathToNode(pnode)
Return a list of the path nodes which lead from the root node to the
specified path node. |
source code
|
|
|
|
|
getNodeProp(pnode,
key,
default=None)
Get a property from the given node, returning
default in the case that the specified property is
not present. |
source code
|
|
|
getPathProp(pnode,
key,
default=None)
Retrieve the specified property by walking the give
path backward until the property is found. |
source code
|
|
|
|
|
isPathLoop(pnode,
key,
value)
Assuming you have some identifier property (such as graph node id)
being set on the path nodes, you may use this API to determine if
the current path has a node with the specified key/value property. |
source code
|
|
|
getPathLoopCount(pnode,
key,
value)
Assuming that the key is unique, walk the current path and see how
many times "key" has the specified value. |
source code
|
|