LayoutStream
symbolica.community.graph Class
LayoutStream()A synchronous iterator that advances the native force solver in batches.
Topology is fixed for the lifetime of the stream. Frames contain only coordinates and progress, so notebook viewers can retain their SVG elements.
Member details
node_names
Property · read-only#node_names: list[str] Node names in the same stable index order as every frame's coordinates.
endpoints
Property · read-only#from_dot
Static method#from_dot(dot: str, *, every: int = 4, steps: int = 200, epochs: int = 8, seed: int = 1, step: float = 0.02, cool: float = 0.85, spring_strength: float = 1.0, repulsion: float = 1.5, length_scale: float = 1.0, spring_length_scale: float = 1.0, external_pull: float = 0.0, external_pull_balance: float = 1.0, external_pull_attachment: float = 1.0, initial_repulsion: float = 1.0, repulsion_growth: float = 0.7, depth_scale: float = 1.0, flattening_end: float = 0.5, delta: float = 0.1, early_tolerance: float = 1e-06) -> LayoutStream Start a force-layout preview from a single DOT graph.
This preview uses native graph geometry, without Typst label measurement or final edge-label relaxation. A new stream restarts from the same seed. spring_length_scale changes spring rest lengths without scaling repulsion. external_pull_attachment multiplies the extra demand from distributed owners sharing an external X coordinate; zero disables that correction. external_pull applies a constant left/right pull for mixed external flows, or a radial pull when all flows agree. external_pull_balance is a finite nonnegative exponent on topology weights: 0 gives uniform pull, 1 (the default) balances topology, and values above 1 strengthen balancing. It does not change radial pull. initial_repulsion grows to one over the repulsion_growth fraction of the iteration budget.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
dot | str | — | — |
every | int | 4 | — |
steps | int | 200 | — |
epochs | int | 8 | — |
seed | int | 1 | — |
step | float | 0.02 | — |
cool | float | 0.85 | — |
spring_strength | float | 1.0 | — |
repulsion | float | 1.5 | — |
length_scale | float | 1.0 | — |
spring_length_scale | float | 1.0 | — |
external_pull | float | 0.0 | — |
external_pull_balance | float | 1.0 | — |
external_pull_attachment | float | 1.0 | — |
initial_repulsion | float | 1.0 | — |
repulsion_growth | float | 0.7 | — |
depth_scale | float | 1.0 | — |
flattening_end | float | 0.5 | — |
delta | float | 0.1 | — |
early_tolerance | float | 1e-06 | — |
__iter__
Method#__iter__() -> LayoutStreamNo description is available for this member.
__next__
Method#__next__() -> LayoutFrameNo description is available for this member.
View generated signature source: docs/api/python/linnet-graph.pyi:949