path

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoPath = errors.New("no path found")

ErrNoPath is returned when no path exists between the two nodes.

Functions

This section is empty.

Types

type PathNode

type PathNode struct {
	RID   libfossil.FslID
	From  *PathNode
	Depth int
}

PathNode represents a single node in a path through the plink DAG.

func Shortest

func Shortest(db *sql.DB, from, to libfossil.FslID, directOnly bool, skip map[libfossil.FslID]bool) ([]PathNode, error)

Shortest finds the shortest path from `from` to `to` in the plink DAG using BFS. If directOnly is true, only primary parent edges (isprim=1) are traversed. Nodes in the skip set are not visited.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL