graphs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanReach

func CanReach[V comparable](source V, target V, downstream func(out []V, from V) []V) bool

func Dijkstras

func Dijkstras[V comparable](starting []V, goal func(V) bool, dwn DownstreamFunc[V]) []V

func DijkstrasErr

func DijkstrasErr[V comparable](starting []V, goal func(V) bool, dwn DownstreamFuncErr[V]) ([]V, error)

func FindCycle

func FindCycle[V comparable](sources []V, downstream func(out []V, from V) []V) []V

Types

type DownstreamFunc

type DownstreamFunc[V comparable] = func(V) iter.Seq[V]

DownstreamFunc returns an iterator over Vertices immediately downstream of a given Vertex.

type DownstreamFuncErr

type DownstreamFuncErr[V comparable] = func(V) iter.Seq2[V, error]

Jump to

Keyboard shortcuts

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