LayerSweepCrossingMinimizer is ELK Layered's phase-three layer sweep. Its
zero value is the BARYCENTER phase implementation used by the provider.TypeCrossMinType HierarchyAware is a marker used by the layered executor. In an
INCLUDE_CHILDREN layout this processor must be paused on child graphs and
invoked once on the root after every graph has completed all processors
preceding phase three.(*LayerSweepCrossingMinimizer) Process(arena *layered.LGraphArena, graphID layered.LGraphID) error ProcessHierarchy is the source-shaped hierarchy-aware entry point. graphID
must be the hierarchy root; initialization then discovers every child graph
breadth-first and assigns GraphInfoHolder indices before sweeping bottom-up
or through nested graphs as decided by LayerSweepTypeDecider.(*LayerSweepCrossingMinimizer) ProcessorConfiguration(_ *layered.LGraphArena, _ layered.LGraphID) layered.ProcessorConfiguration
*LayerSweepCrossingMinimizer : github.com/d2lang/elk-go/internal/layered.ConfiguredProcessor
*LayerSweepCrossingMinimizer : github.com/d2lang/elk-go/internal/layered.LayoutProcessor
func NewGreedySwitchPostprocessor(strategy layered.IntermediateProcessorStrategy) (*LayerSweepCrossingMinimizer, error)
func NewLayerSweepCrossingMinimizer(crossMinType CrossMinType) *LayerSweepCrossingMinimizer
SweepCopy stores the node order and each node's current port order. Port
orders are indexed by layer and position, just as in ELK 0.8.1; this means
they travel with a candidate sweep order rather than with arena IDs.(*SweepCopy) Clone() *SweepCopy Nodes returns the saved order. Callers must treat it as read-only, matching
SweepCopy.nodes()'s contract in Java.(*SweepCopy) TransferNodeAndPortOrdersToGraph(arena *layered.LGraphArena, graphID layered.LGraphID, setPortConstraints bool)
func NewSweepCopy(arena *layered.LGraphArena, nodeOrder [][]layered.LNodeID) *SweepCopy
func (*GraphInfoHolder).GetBestSweep() *SweepCopy
func (*SweepCopy).Clone() *SweepCopy
GreedySwitchIntermediateForGraph implements GraphConfigurator's exact
activation decision. It must be called while the graph is still layerless,
since the threshold is compared to LGraph.layerlessNodes.size().
InitializeAllCrossingsCounter performs IInitializable.init's exact
layer/node/port/edge nesting and connected-edge order.
The pages are generated with Goldsv0.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.