package wrapping
Import Path
github.com/d2lang/elk-go/internal/layered/intermediate/wrapping (on go.dev)
Dependency Relation
imports 6 packages, and imported by one package
Involved Source Files
breaking_point_inserter.go
breaking_point_processor.go
breaking_point_remover.go
cuts.go
cutting.go
single_edge.go
stats.go
Package-Level Type Names (total 2)
End layered.LNodeID
EndInLayerDummy *layered.LNodeID
EndInLayerEdge *layered.LEdgeID
Next *BPInfo
NodeStartEdge layered.LEdgeID
OriginalEdge layered.LEdgeID
Prev *BPInfo
Start layered.LNodeID
StartEndEdge layered.LEdgeID
StartInLayerDummy *layered.LNodeID
StartInLayerEdge *layered.LEdgeID
GraphStats is the source GraphStats cache used by the graph-wrapping
heuristics. ELK's estimates intentionally include one spacing quantum for
every node and layer.
DesiredAspectRatio float64
LongestPath int
(*GraphStats) ApproximateChunkBasedLayeringHeight(cuts []int) float64
(*GraphStats) ApproximateChunkBasedLayeringWidth(cuts []int) float64
(*GraphStats) ApproximateLayerHeight(layerID layered.LayerID) float64
(*GraphStats) ApproximateLayerWidth(layerID layered.LayerID) float64
(*GraphStats) ApproximateLayeringHeight() float64
(*GraphStats) ApproximateLayeringWidth() float64
(*GraphStats) CutsAllowed() []bool
(*GraphStats) Heights() []float64
(*GraphStats) IsCutAllowed(layerIndex int) bool
(*GraphStats) MaxHeight() float64
(*GraphStats) MaxWidth() float64
(*GraphStats) SumWidth() float64
(*GraphStats) Widths() []float64
func NewGraphStats(arena *layered.LGraphArena, graphID layered.LGraphID) *GraphStats
func ValidifyIndexesGreedily(stats *GraphStats, desired []int) []int
func ValidifyIndexesLookingBack(stats *GraphStats, desired []int) []int
Package-Level Functions (total 10)
InsertBreakingPoints computes multi-edge cuts after layering and introduces
the paired marker layers used by the later wrapping processors.
InsertDummies inserts the two in-layer and intervening long-edge dummies
used to route one wrapping edge back across the drawing.
func IsBreakingPointEnd(arena *layered.LGraphArena, nodeID layered.LNodeID) bool func IsBreakingPointStart(arena *layered.LGraphArena, nodeID layered.LNodeID) bool func NewGraphStats(arena *layered.LGraphArena, graphID layered.LGraphID) *GraphStats
ProcessBreakingPoints folds the chunks marked by InsertBreakingPoints onto
the initial layers and optionally applies ELK's two dummy-chain shortening
passes.
RemoveBreakingPoints reassembles each split edge after routing and removes
the paired breaking-point markers.
func ValidifyIndexesGreedily(stats *GraphStats, desired []int) []int func ValidifyIndexesLookingBack(stats *GraphStats, desired []int) []int
WrapSingleEdgeGraph is the direct SingleEdgeGraphWrapper port. It applies
only after layering and crossing minimization, immediately before node
placement.
![]() |
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. |