Documentation
¶
Index ¶
- func CanReach[V comparable](source V, target V, downstream func(out []V, from V) []V) bool
- func Dijkstras[V comparable](starting []V, goal func(V) bool, dwn DownstreamFunc[V]) []V
- func DijkstrasErr[V comparable](starting []V, goal func(V) bool, dwn DownstreamFuncErr[V]) ([]V, error)
- func FindCycle[V comparable](sources []V, downstream func(out []V, from V) []V) []V
- type DownstreamFunc
- type DownstreamFuncErr
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]
Click to show internal directories.
Click to hide internal directories.