Skip to content

Commit

Permalink
Update kruskal.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignacio Aravena committed Feb 6, 2018
1 parent 793bac4 commit a0e9c47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spanningtrees/kruskal.jl
Expand Up @@ -29,11 +29,12 @@ distance matrix `distmx` using [Kruskal's algorithm](https://en.wikipedia.org/wi
"""
function kruskal_mst end
# see https://github.com/mauro3/SimpleTraits.jl/issues/47#issuecomment-327880153 for syntax
@traitfn function kruskal_mst{T<:AbstractEdge, U<:Real, V, AG<:AbstractGraph{T}}(
@traitfn function kruskal_mst{U<:Real, V, AG<:AbstractGraph{V}}(
g::AG::(!IsDirected),
distmx::AbstractMatrix{U} = weights(g)
)

T = edgetype(g)
edge_list = Vector{KruskalHeapEntry{T, U}}()
mst = Vector{T}()
connected_vs = collect(one(V):nv(g))
Expand Down

0 comments on commit a0e9c47

Please sign in to comment.