Closed oyamad closed 9 years ago
Definitely a bug.
OK, I think I fixed it. Can you test with this and other graphs?
@sbromberger Thanks, it worked correctly with v.0.4.0-dev (for the particular graph above).
But with v.0.3.9, I got the following error:
julia> strongly_connected_components(g)
ERROR: type cannot be constructed
in strongly_connected_components at /Users/oyama/.julia/v0.3/LightGraphs/src/connectivity.jl:73
@oyamad - yes - bfsdfs isn't going to work on 0.3 until https://github.com/JuliaLang/Compat.jl/issues/105 is fixed. It's because I'm using Vector{Int}()
to create vectors instead of Int[]
, which is the "old" way.
Looks like we've squashed this bug, so I'll go ahead and close it out. Thanks - feel free to reopen if you continue to see a problem.
(Copied from QuantEcon/QuantEcon.jl#32, comment)
I was considering the digraph in Figure 8 on page 12 in "Graph-Theoretic Analysis of Finite Markov Chains" by J. P. Jarvis and D. R. Shier, which is clearly strongly connected, but
LightGraphs.strongly_connected_components
returns three components:I wonder if I am missing anything.
Just in case,
NetworkX
returns the whole set of nodes as a unique strongly connected component: