DotGraphBuilder
linnet_py Class
DotGraphBuilder()Builder for constructing DOT graphs programmatically.
Constructor
#Create a new, empty graph builder.
Member details
add_node
Method#
add_node(data: Optional[DotVertexData] = None) -> NodeIndexAdd a node and return its index.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
data | Optional[DotVertexData] | None | — |
add_edge
Method#
add_edge(source: NodeIndex, sink: NodeIndex, data: Optional[DotEdgeData] = None, orientation: Optional[Orientation] = None, source_hedge: Optional[DotHedgeData] = None, sink_hedge: Optional[DotHedgeData] = None) -> NoneAdd an edge between two nodes.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
source | NodeIndex | — | — |
sink | NodeIndex | — | — |
data | Optional[DotEdgeData] | None | — |
orientation | Optional[Orientation] | None | — |
source_hedge | Optional[DotHedgeData] | None | — |
sink_hedge | Optional[DotHedgeData] | None | — |
add_external_edge
Method#
add_external_edge(source: NodeIndex, data: Optional[DotEdgeData] = None, orientation: Optional[Orientation] = None, flow: Optional[Flow] = None, hedge: Optional[DotHedgeData] = None) -> NoneAdd a dangling (external) edge incident to a node.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
source | NodeIndex | — | — |
data | Optional[DotEdgeData] | None | — |
orientation | Optional[Orientation] | None | — |
flow | Optional[Flow] | None | — |
hedge | Optional[DotHedgeData] | None | — |
build
MethodView generated signature source: docs/api/python/linnet-py.pyi:247