Versions in this module Expand all Collapse all v0 v0.2.0 May 27, 2026 Changes in this version + type Edge struct + From string + To string + Weight float64 + type ForceOpts struct + Charge float64 + Height float64 + Iterations int + LinkDistance float64 + Seed int64 + Width float64 + type ForcePosition struct + ID string + X float64 + Y float64 + func ForceLayout(g *Graph, opts ForceOpts) ([]ForcePosition, error) + type Graph struct + Edges []Edge + Nodes []Node + func NewGraph() *Graph + func (g *Graph) AddEdge(e Edge) + func (g *Graph) AddNode(n Node) + func (g *Graph) BuildTree() (string, error) + func (g *Graph) Children(id string) []string + func (g *Graph) EdgeCount() int + func (g *Graph) HasCycle() bool + func (g *Graph) NodeCount() int + func (g *Graph) Parents(id string) []string + func (g *Graph) Roots() []string + type Node struct + ID string + Label string + type TreePosition struct + Depth int + ID string + X float64 + Y float64 + func TidyTree(g *Graph, rootID string, horizontalGap, verticalGap float64) ([]TreePosition, error)