DotGraph
linnet_py Class
DotGraph()DOT-backed hedge graph.
Member details
global_data
Property · read/write## setter
global_data: GlobalDataGlobal graph attributes.
Setter
global_data: GlobalDataParameters
| Name | Type | Default | Description |
|---|---|---|---|
value | GlobalData | — | — |
from_string
Class method#
from_string(s: str) -> DotGraphParse a DOT string into a graph.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
s | str | — | — |
from_string_set
Class method#
from_string_set(s: str) -> list[DotGraph]Parse a DOT string into multiple graphs.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
s | str | — | — |
from_file
Class method#
from_file(path: str) -> DotGraphParse a DOT file into a graph.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
path | str | — | — |
debug_dot
Methoddot
Methoddot_of
Methodn_nodes
Methodn_edges
Methodn_hedges
Methodn_externals
Methodn_internals
Methodfull_filter
Methodempty_subgraph
Methoditer_edges
Methoditer_edges_of
Methoditer_nodes
Methoditer_nodes_of
Methodconnected_components
Methodcount_connected_components
Methodis_connected
Methoddepth_first_traverse
Methodbreadth_first_traverse
Methodbridges
Methodbridges_of
Methodcycle_basis
Methodcycle_basis_of
Methodall_spanning_forests
Methodall_spanning_forests_of
Methodcombine_to_single_hedgenode
Methodall_cuts
Methodall_cuts_from_ids
Methodcontract_subgraph
Method#
contract_subgraph(subgraph: Subgraph, node_data_merge: Optional[DotVertexData] = None) -> NoneContract a subgraph into a single node, deleting its edges.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
subgraph | Subgraph | — | — |
node_data_merge | Optional[DotVertexData] | None | — |
join
Method#
join(other: DotGraph, matching_fn: Any, merge_fn: Any) -> DotGraphJoin two graphs, matching dangling edges via a Python callback.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
other | DotGraph | — | — |
matching_fn | Any | — | — |
merge_fn | Any | — | — |
join_mut
Method#
join_mut(other: DotGraph, matching_fn: Any, merge_fn: Any) -> NoneIn-place join, matching dangling edges via a Python callback.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
other | DotGraph | — | — |
matching_fn | Any | — | — |
merge_fn | Any | — | — |
extract
Method#
extract(subgraph: Subgraph, split_edge_fn: Any, internal_data: Any, split_node: Any, owned_node: Any) -> DotGraphExtract a subgraph with Python callbacks to transform edge/node data.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
subgraph | Subgraph | — | — |
split_edge_fn | Any | — | — |
internal_data | Any | — | — |
split_node | Any | — | — |
owned_node | Any | — | — |
__getitem__
Method#
Overloads
Overload 1 #
__getitem__(key: Hedge) -> DotHedgeDataNo additional description is available for this overload.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | Hedge | — | — |
Overload 2 #
__getitem__(key: NodeIndex) -> DotVertexDataNo additional description is available for this overload.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | NodeIndex | — | — |
Overload 3 #
__getitem__(key: EdgeIndex) -> DotEdgeDataNo additional description is available for this overload.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | EdgeIndex | — | — |
View generated signature source: docs/api/python/linnet-py.pyi:85