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 ¶
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.
Click to show internal directories.
Click to hide internal directories.