Skip to content

Commit 0153724

Browse files
committed
fix copy bug and nits
1 parent 05e3b7e commit 0153724

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/connectivity.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If not provided, it is automatically instantiated.
1515
This algorithm is linear in the number of edges of the graph.
1616
"""
1717
function 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
"""
179179
function 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

0 commit comments

Comments
 (0)