Versions in this module Expand all Collapse all v0 v0.0.6-ctx-cancel Aug 5, 2020 v0.0.1 Aug 16, 2019 Changes in this version + func Kruskal(dst WeightedBuilder, g UndirectedWeightLister) float64 + func NullHeuristic(_, _ graph.Node) float64 + func Prim(dst WeightedBuilder, g graph.WeightedUndirected) float64 + func YenKShortestPaths(g graph.Graph, k int, s, t graph.Node) [][]graph.Node + type AllShortest struct + func DijkstraAllPaths(g graph.Graph) (paths AllShortest) + func FloydWarshall(g graph.Graph) (paths AllShortest, ok bool) + func JohnsonAllPaths(g graph.Graph) (paths AllShortest, ok bool) + func NewAllShortestByDump(dump []byte) (AllShortest, error) + func (g *AllShortest) Marshal() ([]byte, error) + func (p AllShortest) AllBetween(uid, vid int64) (paths [][]graph.Node, weight float64) + func (p AllShortest) Between(uid, vid int64) (path []graph.Node, weight float64, unique bool) + func (p AllShortest) Weight(uid, vid int64) float64 + type Heuristic func(x, y graph.Node) float64 + type HeuristicCoster interface + HeuristicCost func(x, y graph.Node) float64 + type Shortest struct + func AStar(s, t graph.Node, g graph.Graph, h Heuristic) (path Shortest, expanded int) + func BellmanFordFrom(u graph.Node, g graph.Graph) (path Shortest, ok bool) + func DijkstraFrom(u graph.Node, g traverse.Graph) Shortest + func (p Shortest) From() graph.Node + func (p Shortest) To(vid int64) (path []graph.Node, weight float64) + func (p Shortest) WeightTo(vid int64) float64 + type UndirectedWeightLister interface + WeightedEdges func() graph.WeightedEdges + type Weighted interface + Weight func(xid, yid int64) (w float64, ok bool) + type WeightedBuilder interface + AddNode func(graph.Node) + SetWeightedEdge func(graph.WeightedEdge) + type Weighting func(xid, yid int64) (w float64, ok bool) + func UniformCost(g traverse.Graph) Weighting