sbromberger / SimpleWeightedGraphs.jl

Simple weighted graphs. Requires LightGraphs.jl.
Other
49 stars 22 forks source link

Ambiguity error on pagerank #60

Closed Tokazama closed 4 years ago

Tokazama commented 4 years ago

Had the following ambiguity error just pop up.

julia> SimpleWeightedGraphs.pagerank(g)
ERROR: MethodError: pagerank(::SimpleWeightedDiGraph{Int64,Float64}, ::Float64, ::Int64, ::Float64) is ambiguous. Candidates:
  pagerank(g::SimpleWeightedDiGraph, α, n, ϵ) in SimpleWeightedGraphs at /Users/zchristensen/.julia/packages/SimpleWeightedGraphs/yU
Frc/src/overrides.jl:22
  pagerank(g::AbstractGraph{U}, α, n::Integer, ϵ) where U<:Integer in LightGraphs at /Users/zchristensen/.julia/packages/LightGraphs
/HsNig/src/centrality/pagerank.jl:21
Possible fix, define
  pagerank(::SimpleWeightedDiGraph{U<:Integer,U} where U<:Real, ::Any, ::Integer, ::Any)
S
sbromberger commented 4 years ago

What's g?

sbromberger commented 4 years ago

I can reproduce with

g = SimpleWeightedDiGraph(path_graph(10), 3)
sbromberger commented 4 years ago

This was fixed by #55. We need to tag a new release but the master branch passes all tests.