Julia icon indicating copy to clipboard operation
Julia copied to clipboard

Implemented Bellman-Ford, fixes #142

Open ybrenning opened this issue 3 years ago • 4 comments

I added an implementation of Bellman-Ford with documentation.

For ease of understanding, this implementation uses a graph which is declared as a list of edges where each edge is a tuple with the parameters (source vertex, destination vertex, weight).

ybrenning avatar Sep 08 '22 16:09 ybrenning

I also changed the name of the Dijkstra implementation as there was a typo, it seems to have thrown off some of the CI though...

ybrenning avatar Sep 08 '22 17:09 ybrenning

image Since BFS and DFS use the queue and stack data structures which need to be imported in Julia with using DataStructures, the logs say we need to include this dependency for the package.

Is there anywhere else I would need to add the dependency? afaik it should be working since I added it to TheAlgorithms.jl which also contains other dependencies such as Random and Linear Algebra which seem to work just fine

ybrenning avatar Sep 08 '22 23:09 ybrenning

image Since BFS and DFS use the queue and stack data structures which need to be imported in Julia with using DataStructures, the logs say we need to include this dependency for the package.

Is there anywhere else I would need to add the dependency? afaik it should be working since I added it to TheAlgorithms.jl which also contains other dependencies such as Random and Linear Algebra which seem to work just fine

I guess it should be added to Project.toml. Random and Linear Algebra are there.

Panquesito7 avatar Sep 09 '22 03:09 Panquesito7

Codecov Report

Merging #143 (38db405) into main (0a27c5f) will increase coverage by 0.10%. The diff coverage is 94.44%.

@@            Coverage Diff             @@
##             main     #143      +/-   ##
==========================================
+ Coverage   90.94%   91.04%   +0.10%     
==========================================
  Files          90       91       +1     
  Lines        1424     1441      +17     
==========================================
+ Hits         1295     1312      +17     
  Misses        129      129              
Impacted Files Coverage Δ
src/graph/dfs.jl 0.00% <0.00%> (ø)
src/graph/dijkstra.jl 100.00% <ø> (ø)
src/graph/bellman_ford.jl 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Sep 09 '22 07:09 codecov[bot]