Versions in this module Expand all Collapse all v1 v1.0.1 Aug 10, 2025 v1.0.0 Aug 10, 2025 Changes in this version + var ErrWeightIsNegative = errors.New("dijkstra algorithms, the weight cannot be a negative value") + func FloydWarshall(g GraphFloydWarshall) [][]int + type EdgeDijkstra struct + To int + Weight int + type GraphBFS struct + func NewGraphBFS() *GraphBFS + func (g *GraphBFS) AddEdge(v, w int) + func (g *GraphBFS) BFS(start int) []int + type GraphDFS struct + func NewGraphDFS() *GraphDFS + func (g *GraphDFS) AddEdge(v, w int) + func (g *GraphDFS) DFSIterative(start int) []int + func (g *GraphDFS) DFSRecursive(start int, visited map[int]bool, result *[]int) + type GraphDijkstra struct + Edges map[int][]EdgeDijkstra + Vertices int + func (g *GraphDijkstra) Dijkstra(start int) ([]int, error) + type GraphFloydWarshall struct + Graph [][]int + type ItemDijkstra struct + type PriorityQueue []*ItemDijkstra + func (pq *PriorityQueue) Len() int + func (pq *PriorityQueue) Pop() interface{} + func (pq *PriorityQueue) Push(x interface{}) + func (pq PriorityQueue) Less(i, j int) bool + func (pq PriorityQueue) Swap(i, j int)