package force

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

Dependency Relation
	imports 9 packages, and imported by 2 packages

Involved Source Files components.go graph.go importer.go model.go Package force is a native Go port of org.eclipse.elk.force targeting ELK.js 0.12.0. Its source-shaped names and iteration order retain the historical ELK 0.8.1 translation where that behavior remains observable in 0.12.0. provider.go
Package-Level Type Names (total 8)
/* sort by: | */
Adjacency [][]int AspectRatio float64 BBLowRight geometry.Point BBUpLeft geometry.Point Bendpoints []*FBendpoint Edges []*FEdge Interactive bool Iterations int Labels []*FLabel Model string Nodes []*FNode Origin graph.NodeID Padding geometry.Spacing Priority int Random *javacompat.Random Repulsion float64 SeparateConnectedComponents bool SpacingNodeNode float64 Temperature float64 (*FGraph) CalcAdjacency() (*FGraph) Connection(forcer *Particle, forcee *Particle) int (*FGraph) Particles() []*Particle func Recombine(components []*FGraph) *FGraph func Split(fgraph *FGraph) []*FGraph func (*Importer).ImportGraph() (*FGraph, error) func Recombine(components []*FGraph) *FGraph func Split(fgraph *FGraph) []*FGraph func (*Importer).ApplyLayout(fgraph *FGraph) func github.com/d2lang/elk-go/internal/stress.(*Majorization).Initialize(model *graph.Model, fgraph *FGraph)
Importer is the Go counterpart of ELK 0.8.1's ElkGraphImporter. It retains arena IDs rather than Java origin-object properties. ApplyLayout transfers FGraph coordinates back to the core graph, preserving ELK's mutation order (nodes are offset before edge endpoints are clipped). (*Importer) ImportGraph() (*FGraph, error) func NewImporter(model *graph.Model, parent graph.NodeID) *Importer
Particle is ELK's FParticle. Position is a center for nodes and the top-left corner for labels, matching the Java implementation. Displacement geometry.Point Position geometry.Point Priority int Size geometry.Point (*Particle) Radius() float64 func (*FGraph).Particles() []*Particle func (*FGraph).Connection(forcer *Particle, forcee *Particle) int func (*FGraph).Connection(forcer *Particle, forcee *Particle) int
(*Provider) Layout(model *graph.Model, parent graph.NodeID, monitor core.ProgressMonitor) error *Provider : github.com/d2lang/elk-go/internal/core.LayoutProvider
Package-Level Functions (total 6)
InitialLayout runs the exact force initialization used by ELK Stress when interactive mode is disabled. It is exported only to the sibling stress package within this module.
func NewImporter(model *graph.Model, parent graph.NodeID) *Importer
Recombine mirrors ComponentsProcessor.recombine.
RegisterOptions adds the ForceOptions metadata supported by ELK 0.12.0. Shared core options may already be present, so registration is idempotent.
Split mirrors ComponentsProcessor.split, including its source-shaped DFS edge append behavior on cyclic components.
Package-Level Constants (total 2)
const ModelEades = "EADES"
const ModelFruchtermanReingold = "FRUCHTERMAN_REINGOLD"