Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into compathelper/new_version/2021-02-20-00-27-…
Browse files Browse the repository at this point in the history
…44-187-353968218
  • Loading branch information
sbromberger authored May 13, 2021
2 parents 99192bf + 6134e21 commit ad5e4f8
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ jobs:
# uncomment after 2.0
# - uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-uploadcodecov@latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: ${{ matrix.julia-version == '1' && matrix.os =='ubuntu-latest' }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# LightGraphs

[![Build Status](https://travis-ci.org/JuliaGraphs/LightGraphs.jl.svg?branch=master)](https://travis-ci.org/JuliaGraphs/LightGraphs.jl)
[![Build Status](https://github.com/JuliaGraphs/LightGraphs.jl/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/JuliaGraphs/LightGraphs.jl/actions/workflows/ci.yml?query=branch%3Amaster)
[![codecov.io](http://codecov.io/github/JuliaGraphs/LightGraphs.jl/coverage.svg?branch=master)](http://codecov.io/github/JuliaGraphs/LightGraphs.jl?branch=master)
[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://juliagraphs.github.io/LightGraphs.jl/latest)
[![Join the chat at https://gitter.im/JuliaGraphs/LightGraphs.jl](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/JuliaGraphs/LightGraphs.jl)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.889971.svg)](https://doi.org/10.5281/zenodo.889971)

LightGraphs offers both (a) a set of simple, concrete graph implementations -- `Graph`
Expand Down
2 changes: 1 addition & 1 deletion docs/src/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ within the LightGraphs package should just work:
- [`outneighbors`](@ref)
- [`vertices`](@ref)
- [`is_directed`](@ref): Note that since LightGraphs uses traits to determine directedness, `is_directed` for a `CustomGraph` type
should be implemented with **both** of the following signatures:
should be implemented with **both** of the following signatures:
- `is_directed(::Type{CustomGraph})::Bool` (example: `is_directed(::Type{<:CustomGraph}) = false`)
- `is_directed(g::CustomGraph)::Bool`
- [`zero`](@ref)
Expand Down
2 changes: 0 additions & 2 deletions src/connectivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ julia> strongly_connected_components(g)
```
"""

function strongly_connected_components end
# see https://github.com/mauro3/SimpleTraits.jl/issues/47#issuecomment-327880153 for syntax
@traitfn function strongly_connected_components(g::AG::IsDirected) where {T<:Integer, AG <: AbstractGraph{T}}
Expand Down Expand Up @@ -374,7 +373,6 @@ julia> strongly_connected_components_kosaraju(g)
```
"""

function strongly_connected_components_kosaraju end
@traitfn function strongly_connected_components_kosaraju(g::AG::IsDirected) where {T<:Integer, AG <: AbstractGraph{T}}

Expand Down
4 changes: 2 additions & 2 deletions src/shortestpaths/bellman-ford.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ will return a vector (indexed by destination vertex) of paths from source `v`
to all other vertices. In addition, `enumerate_paths(state, v, d)` will return
a vector representing the path from vertex `v` to vertex `d`.
"""
function enumerate_paths(state::AbstractPathState, vs::Vector{<:Integer})
function enumerate_paths(state::AbstractPathState, vs::AbstractVector{<:Integer})
parents = state.parents
T = eltype(parents)

Expand All @@ -131,6 +131,6 @@ function enumerate_paths(state::AbstractPathState, vs::Vector{<:Integer})
return all_paths
end

enumerate_paths(state::AbstractPathState, v) = enumerate_paths(state, [v])[1]
enumerate_paths(state::AbstractPathState, v::Integer) = enumerate_paths(state, [v])[1]
enumerate_paths(state::AbstractPathState) = enumerate_paths(state, [1:length(state.parents);])

1 change: 0 additions & 1 deletion src/shortestpaths/spfa.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ julia> spfa_shortest_paths(gx, 1, d)
```
"""

function spfa_shortest_paths(
graph::AbstractGraph{U},
source::Integer,
Expand Down
3 changes: 3 additions & 0 deletions test/shortestpaths/dijkstra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
@test @inferred(enumerate_paths(z)) == enumerate_paths(y)
@test @inferred(enumerate_paths(z))[4] ==
enumerate_paths(z, 4) ==
# test that we can pass a range into enumerate_paths - previously this caused
# infinite recursion - see #1552
enumerate_paths(z, 3:4)[2] ==
enumerate_paths(y, 4) == [2, 3, 4]
end

Expand Down

0 comments on commit ad5e4f8

Please sign in to comment.