File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ If not provided, it is automatically instantiated.
1515This algorithm is linear in the number of edges of the graph.
1616"""
1717function connected_components! (
18- label:: AbstractVector , g:: AbstractGraph{T} , search_queue:: Vector{T} = Vector {T} ()
18+ label:: AbstractVector{T} , g:: AbstractGraph{T} , search_queue:: Vector{T} = Vector {T} ()
1919) where {T}
2020 isempty (search_queue) || error (" provided `search_queue` is not empty" )
2121 for u in vertices (g)
@@ -178,11 +178,11 @@ julia> count_connected_components(g)
178178"""
179179function count_connected_components (
180180 g:: AbstractGraph{T} ,
181- label:: AbstractVector = zeros (T, nv (g)),
181+ label:: AbstractVector{T} = zeros (T, nv (g)),
182182 search_queue:: Vector{T} = Vector {T} ();
183183 reset_label:: Bool = false
184184) where T
185- _connected_components ! (label, g, search_queue)
185+ connected_components ! (label, g, search_queue)
186186 c = count_unique (label)
187187 reset_label && fill! (label, zero (eltype (label)))
188188 return c
You can’t perform that action at this time.
0 commit comments