Closed
Description
using LightGraphs, MetaGraphs
g = LightGraphs.SimpleGraphs.grid([5, 24])
MetaGraph(g)
crashes with
ERROR: LoadError: MethodError: no method matching Graphs.SimpleGraphs.SimpleGraph(::SimpleGraph{Int64})
Closest candidates are:
Graphs.SimpleGraphs.SimpleGraph(::Any, ::Array{Vector{T}, 1}) where T at C:\Users\racinsky\.julia\packages\Graphs\Mih78\src\SimpleGraphs\simplegraph.jl:18
Graphs.SimpleGraphs.SimpleGraph() at C:\Users\racinsky\.julia\packages\Graphs\Mih78\src\SimpleGraphs\simplegraph.jl:50
Graphs.SimpleGraphs.SimpleGraph(::Graphs.SimpleGraphs.SimpleGraph) at C:\Users\racinsky\.julia\packages\Graphs\Mih78\src\SimpleGraphs\simplegraph.jl:115
...
Stacktrace:
[1] MetaGraph(x::SimpleGraph{Int64}, weightfield::Symbol, defaultweight::Float64)
@ MetaGraphs C:\Users\racinsky\.julia\packages\MetaGraphs\bffKb\src\metagraph.jl:14
[2] MetaGraph(x::SimpleGraph{Int64})
@ MetaGraphs C:\Users\racinsky\.julia\packages\MetaGraphs\bffKb\src\metagraph.jl:26
[3] top-level scope
@ c:\Projects\others\advent_of_code_2021\loading_data.jl:545
in expression starting at c:\Projects\others\advent_of_code_2021\loading_data.jl:545
that's because without parameters it does not dispatch to /~https://github.com/JuliaGraphs/MetaGraphs.jl/blob/master/src/metagraph.jl#L36.
Metadata
Assignees
Labels
No labels