Repository navigation
fix(deps): update module github.com/hmdsefi/gograph to v0.11.0 - #236
Merged
Merged
Conversation
Signed-off-by: renovate[bot] <bot@renovateapp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.10.0→v0.11.0Release Notes
hmdsefi/gograph (github.com/hmdsefi/gograph)
v0.11.0Compare Source
This release adds
AStar,Bidirectional,KShortest,BeamandNegativeCycleto thepathpackage, withDijkstraPaths,BellmanFordPathsandBFSPathsto return the shortest paths themselves, andBridges,ArticulationPointsandUndirectedCutsto find the edges and vertices that split an undirected graph. Every existing function and type keeps its signature.Added
path.DijkstraPaths,path.BellmanFordPathsandpath.BFSPathsreturn apath.ShortestPathswith the shortest path from one vertex to each vertex itreaches.
DistanceandPathToreportfalsefor a vertex out of reach,where
Dijkstragivesmath.MaxFloat64andBellmanFord+Inf.DijkstraPathsandBFSPathsread only what the start reaches and use O(V)extra space for it. On a graph of 10,000 vertices and 50,000 edges,
DijkstraPathstakes 3.9 ms and 2.4 MB whereDijkstratakes 4.7 ms and2.7 MB, and 0.008 ms where the start reaches 100 of the vertices.
BellmanFordPathsgives the distances and errors ofBellmanFord, and itspaths never loop when rounding makes a zero cycle look negative.
path.KShortestreturns up to k cheapest simple paths from one vertex toanother, cheapest first. It's Yen's algorithm with Lawler's change, and each
branch search is A* guided by the exact cost to the goal, found once. It keeps
at most k-1 candidate paths and skips a branch that can't beat the worst of
them, so extra space is O(V+E+k·V). On a 100 by 100 grid, 100 paths take
8 ms and 5 MB, where Dijkstra branch searches take 613 ms and an unbounded
candidate list 8.4 MB.
path.Beamreturns a path from one vertex to another, keeping at mostwidthpartial paths at each step, ranked by a caller-supplied score. A smallwidth can miss the cheapest path. Extra space is O(L·width) for a path of L
edges: the kept paths share their common starts, and a step never holds more
than
widthcandidates. On a graph of 30 layers of 300 vertices, width 100takes 48 ms and 0.19 MB, where sorting every candidate takes 121 ms and
80 MB. The new
path.ErrInvalidWidthreports a width below 1.path.AStarreturns the cheapest path from one vertex to another and itscost, stopping at the goal. The caller supplies the edge cost and a heuristic
for the remaining cost. Extra space is O(V). A heuristic that isn't consistent
still gives the cheapest path, in O(V²) expansions where plain A* can take
exponentially many. On a 300 by 300 grid, a Manhattan-distance heuristic takes
0.19 ms and 165 KB, where no heuristic takes 34 ms and 10.5 MB.
path.Bidirectionalreturns the cheapest path from one vertex to anotherand its cost, searching forward from the start and backward from the goal
until they meet. A caller-supplied cost replaces the edge weight, and the
new
path.ErrUnreachablereports a goal the start can't reach.path.NegativeCyclereturns one cycle whose edge weights sum to less thanzero, searching the whole graph.
connectivity.Bridgesandconnectivity.ArticulationPointsfind the edgesand vertices whose removal splits an undirected graph into more pieces, in
O(V+E).
gograph.UndirectedCutsreturns both from one search. A directedgraph returns the new
gograph.ErrNotUndirected.Changed
.agents/skills/gograph/SKILL.mdhas a row for each function added forv0.11.0 that had none:
UndirectedCuts, and inpath,DijkstraPaths,BFSPaths,BellmanFordPaths,NegativeCycle,AStar,Bidirectional,KShortestandBeam. The rows ofpath.Dijkstra,path.BellmanFord,path.DijkstraMultiSourceandtraverse.BFSWithDepthpoint to them.Full Changelog: hmdsefi/gograph@v0.10.0...v0.11.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.