package p4nodes

Import Path
	github.com/d2lang/elk-go/internal/layered/p4nodes (on go.dev)

Dependency Relation
	imports 10 packages, and imported by one package


Package-Level Type Names (total 13)
/* sort by: | */
BKAlignedLayout contains all per-node data for one of the four directional Brandes-Koepf layouts. Pointer entries preserve Java's null-filled object arrays and make missing algorithm initialization fail loudly. Align []*layered.LNodeID BlockSize []*float64 Graph layered.LGraphID HDirection HorizontalDirection InnerShift []*float64 OD []bool Root []*layered.LNodeID SU []bool Shift []*float64 Sink []*layered.LNodeID VDirection VerticalDirection Y []*float64 (*BKAlignedLayout) CalculateDelta(arena *layered.LGraphArena, sourceID, targetID layered.LPortID) float64 (*BKAlignedLayout) CheckSpaceAbove(arena *layered.LGraphArena, blockRoot layered.LNodeID, delta float64, info *NeighborhoodInformation) float64 (*BKAlignedLayout) CheckSpaceBelow(arena *layered.LGraphArena, blockRoot layered.LNodeID, delta float64, info *NeighborhoodInformation) float64 (*BKAlignedLayout) Cleanup() (*BKAlignedLayout) LayoutSize(arena *layered.LGraphArena) float64 (*BKAlignedLayout) MaxY(arena *layered.LGraphArena, nodeID layered.LNodeID) float64 (*BKAlignedLayout) MinY(arena *layered.LGraphArena, nodeID layered.LNodeID) float64 (*BKAlignedLayout) ShiftBlock(arena *layered.LGraphArena, rootID layered.LNodeID, delta float64) (*BKAlignedLayout) String() string *BKAlignedLayout : expvar.Var *BKAlignedLayout : fmt.Stringer func NewBKAlignedLayout(graphID layered.LGraphID, nodeCount int, vertical VerticalDirection, horizontal HorizontalDirection) *BKAlignedLayout func (*BKAligner).InsideBlockShift(layout *BKAlignedLayout) func (*BKAligner).VerticalAlignment(layout *BKAlignedLayout, markedEdges map[layered.LEdgeID]bool) func (*BKCompactor).HorizontalCompaction(arena *layered.LGraphArena, graphID layered.LGraphID, info *NeighborhoodInformation, layout *BKAlignedLayout) func (*ThresholdStrategy).CalculateThreshold(arena *layered.LGraphArena, layout *BKAlignedLayout, oldThreshold float64, blockRoot, currentNode layered.LNodeID) float64 func (*ThresholdStrategy).PostProcess(arena *layered.LGraphArena, info *NeighborhoodInformation, layout *BKAlignedLayout)
Arena *layered.LGraphArena Graph layered.LGraphID Info *NeighborhoodInformation InsideBlockShift accounts for node sizes, margins, and port positions after the original BK block construction. VerticalAlignment groups nodes into blocks while avoiding type-1 conflict edges. The two median neighbors are visited in the ELK-prescribed order. func NewBKAligner(arena *layered.LGraphArena, graphID layered.LGraphID, info *NeighborhoodInformation) *BKAligner
(*BKCompactor) HorizontalCompaction(arena *layered.LGraphArena, graphID layered.LGraphID, info *NeighborhoodInformation, layout *BKAlignedLayout) func NewBKCompactor(arena *layered.LGraphArena, graphID layered.LGraphID) *BKCompactor
BrandesKoepfPlacer adapts the default node placer to the layered pipeline. ( BrandesKoepfPlacer) Process(arena *layered.LGraphArena, graphID layered.LGraphID) error ( BrandesKoepfPlacer) ProcessorConfiguration(arena *layered.LGraphArena, graphID layered.LGraphID) layered.ProcessorConfiguration BrandesKoepfPlacer : github.com/d2lang/elk-go/internal/layered.ConfiguredProcessor BrandesKoepfPlacer : github.com/d2lang/elk-go/internal/layered.LayoutProcessor
func NewBKAlignedLayout(graphID layered.LGraphID, nodeCount int, vertical VerticalDirection, horizontal HorizontalDirection) *BKAlignedLayout const HorizontalBalanced const HorizontalLeft const HorizontalRight
InteractiveNodePlacer keeps existing vertical coordinates where possible and shifts nodes down only enough to eliminate overlaps. (*InteractiveNodePlacer) Process(arena *layered.LGraphArena, graphID layered.LGraphID) error (*InteractiveNodePlacer) ProcessorConfiguration(arena *layered.LGraphArena, graphID layered.LGraphID) layered.ProcessorConfiguration *InteractiveNodePlacer : github.com/d2lang/elk-go/internal/layered.ConfiguredProcessor *InteractiveNodePlacer : github.com/d2lang/elk-go/internal/layered.LayoutProcessor
LinearSegmentsNodePlacer is the ELK 0.8.1 Sander-style placement phase. A segment consists of one regular node or a chain of long-edge / north-south port dummies. The dependency order is placed first, then balanced by the alternating pendulum and rubber iterations from the Java implementation. (*LinearSegmentsNodePlacer) Process(arena *layered.LGraphArena, graphID layered.LGraphID) error (*LinearSegmentsNodePlacer) ProcessorConfiguration(arena *layered.LGraphArena, graphID layered.LGraphID) layered.ProcessorConfiguration *LinearSegmentsNodePlacer : github.com/d2lang/elk-go/internal/layered.ConfiguredProcessor *LinearSegmentsNodePlacer : github.com/d2lang/elk-go/internal/layered.LayoutProcessor
Edge layered.LEdgeID Node layered.LNodeID
NeighborhoodInformation caches the immutable neighbor relation used by all four Brandes-Koepf directional layouts. Arrays are indexed by the scratch IDs assigned in BuildNeighborhoodInformation. LayerIndex []int LeftNeighbors [][]Neighbor NodeCount int NodeIndex []int RightNeighbors [][]Neighbor (*NeighborhoodInformation) Cleanup() func BuildNeighborhoodInformation(arena *layered.LGraphArena, graphID layered.LGraphID) *NeighborhoodInformation func NewBKAligner(arena *layered.LGraphArena, graphID layered.LGraphID, info *NeighborhoodInformation) *BKAligner func (*BKAlignedLayout).CheckSpaceAbove(arena *layered.LGraphArena, blockRoot layered.LNodeID, delta float64, info *NeighborhoodInformation) float64 func (*BKAlignedLayout).CheckSpaceBelow(arena *layered.LGraphArena, blockRoot layered.LNodeID, delta float64, info *NeighborhoodInformation) float64 func (*BKCompactor).HorizontalCompaction(arena *layered.LGraphArena, graphID layered.LGraphID, info *NeighborhoodInformation, layout *BKAlignedLayout) func (*ThresholdStrategy).PostProcess(arena *layered.LGraphArena, info *NeighborhoodInformation, layout *BKAlignedLayout)
NetworkSimplexPlacer is the arena-backed port of ELK 0.8.1's NetworkSimplexPlacer. It converts vertical placement into an auxiliary layering problem and solves that problem with ELK's common network simplex. (*NetworkSimplexPlacer) Process(arena *layered.LGraphArena, graphID layered.LGraphID) error (*NetworkSimplexPlacer) ProcessorConfiguration(arena *layered.LGraphArena, graphID layered.LGraphID) layered.ProcessorConfiguration *NetworkSimplexPlacer : github.com/d2lang/elk-go/internal/layered.ConfiguredProcessor *NetworkSimplexPlacer : github.com/d2lang/elk-go/internal/layered.LayoutProcessor
SimpleNodePlacer stacks each layer and centers it around the tallest layer. (*SimpleNodePlacer) Process(arena *layered.LGraphArena, graphID layered.LGraphID) error (*SimpleNodePlacer) ProcessorConfiguration(arena *layered.LGraphArena, graphID layered.LGraphID) layered.ProcessorConfiguration *SimpleNodePlacer : github.com/d2lang/elk-go/internal/layered.ConfiguredProcessor *SimpleNodePlacer : github.com/d2lang/elk-go/internal/layered.LayoutProcessor
(*ThresholdStrategy) CalculateThreshold(arena *layered.LGraphArena, layout *BKAlignedLayout, oldThreshold float64, blockRoot, currentNode layered.LNodeID) float64 (*ThresholdStrategy) FinishBlock(nodeID layered.LNodeID) (*ThresholdStrategy) Init() (*ThresholdStrategy) PostProcess(arena *layered.LGraphArena, info *NeighborhoodInformation, layout *BKAlignedLayout) func NewThresholdStrategy(simple bool) *ThresholdStrategy
func NewBKAlignedLayout(graphID layered.LGraphID, nodeCount int, vertical VerticalDirection, horizontal HorizontalDirection) *BKAlignedLayout const VerticalBalanced const VerticalDown const VerticalUp
Package-Level Functions (total 6)
PlaceBrandesKoepf runs ELK 0.8.1's extended Brandes-Koepf node placement.