package engine
Import Path
github.com/pancsta/d2/d2layouts/d2talalayout/internal/engine (on go.dev)
Dependency Relation
imports 20 packages, and imported by one package
Involved Source Files
compound_candidate.go
compound_routes.go
Package engine composes TALA's layout stages into one deterministic layout.
Graph ownership belongs to layoutgraph, and individual algorithms live in
their domain packages. Engine owns only stage ordering and the internal
layout entry point.
pipeline.go
Package-Level Type Names (only one)
LayoutOptions configures one deterministic layout attempt.
Seed int64
func Layout(ctx context.Context, graph *layoutgraph.Graph, options LayoutOptions) (*layoutgraph.Graph, error)
Package-Level Functions (total 3)
CompoundCandidate gives the selected drawing at most one rigid-container
placement trial. It never runs another full seed pipeline. The adapter must
validate and compare the completed proposal against the ordinary incumbent.
Layout returns one complete deterministic layout in a new graph. Input is
validated and remains unchanged, so callers may safely reuse it for other
layout attempts.
PreserveCompoundRoutes refines an already-selected compound drawing. Keep
placement selection independent of this routing cleanup: otherwise a cheaper
reroute can promote an unrelated, much wider outer arrangement.
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |