| |
- vcorelib.graph.abc.AbstractDiGraphNode(vcorelib.io.abc.Serializable)
-
- DiGraphNode
class DiGraphNode(vcorelib.graph.abc.AbstractDiGraphNode) |
|
DiGraphNode(graph: ~V = None, label: str = None, port: vcorelib.graph.port.Port = None, **attrs) -> None
A base implementation for a directed-graph node. |
|
- Method resolution order:
- DiGraphNode
- vcorelib.graph.abc.AbstractDiGraphNode
- vcorelib.io.abc.Serializable
- abc.ABC
- builtins.object
Methods defined here:
- add_child(self, label: str, node: ~T = None, graph_kind: Type[~V] = None, **kwargs) -> ~T
- Add an edge between this node (source) and the other node
(destination).
- add_parallel(self, label: str, node: ~T = None, graph_kind: Type[~V] = None, **kwargs) -> ~T
- Add a parallel edge between two nodes. This instance is used as
'node1'.
- add_parent(self, label: str, node: ~T = None, graph_kind: Type[~V] = None, **kwargs) -> ~T
- Add an edge between this node (destination) and the other node
(source).
- to_stream(self, stream: <class 'TextIO'>, **kwargs) -> None
- Write this object to a text stream.
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
Methods inherited from vcorelib.graph.abc.AbstractDiGraphNode:
- __init__(self, graph: ~V = None, label: str = None, port: vcorelib.graph.port.Port = None, **attrs) -> None
- Initialize this graph node.
- add_port(self, label: str, **kwargs) -> vcorelib.graph.port.Port
- Add a port to this graph node.
- allocate_port(self, label: str) -> vcorelib.graph.port.Port
- Allocate a port on this node.
- graph(self, kind: Type[~V] = None) -> ~V
- Get the graph that this node belongs to.
- incoming(self, graph_kind: Type[~V] = None) -> Iterator[~T]
- Iterate over nodes that have incoming edges.
- join_graph(self, graph: ~V, label: str) -> None
- Attempt to join a graph.
- outgoing(self, graph_kind: Type[~V] = None) -> Iterator[~T]
- Iterate over nodes that we have outgoing edges to.
- parallel(self) -> Set[~T]
- Iterate over nodes that this instance shares parallel edges with.
Readonly properties inherited from vcorelib.graph.abc.AbstractDiGraphNode:
- label
- Get this node's label.
Methods inherited from vcorelib.io.abc.Serializable:
- default_location(self) -> Union[pathlib.Path, str, NoneType]
- Get a default serialization destination for this instance.
- to_file(self, path: Union[pathlib.Path, str, NoneType] = None, encoding: str = 'utf-8', **kwargs) -> None
- Write this object to a file.
Data descriptors inherited from vcorelib.io.abc.Serializable:
- __dict__
- dictionary for instance variables
- __weakref__
- list of weak references to the object
| |