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

Commit

Permalink
Update prim.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignacio Aravena authored Feb 6, 2018
1 parent a0e9c47 commit 677f6fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/spanningtrees/prim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ distance matrix `distmx` using [Prim's algorithm](https://en.wikipedia.org/wiki/
Return a vector of edges.
"""
function prim_mst end
@traitfn function prim_mst{T<:AbstractEdge, U<:Real, V, AG<:AbstractGraph{T}}(
@traitfn function prim_mst{U<:Real, V, AG<:AbstractGraph{V}}(
g::AG::(!IsDirected),
distmx::AbstractMatrix{U} = weights(g)
)
)

T = edgetype(g)
pq = Vector{PrimHeapEntry{T, U}}()
mst = Vector{T}()
marked = zeros(Bool, nv(g))
Expand Down

0 comments on commit 677f6fa

Please sign in to comment.