I want to generate a weighted and directed network from an adjacency matrix in Julia (v0.7).
So far I've tried:
using LightGraphs
using SimpleWeightedGraphs
A = rand(100, 100)
G = Graph(A)
but I get error:
ERROR: ArgumentError: Adjacency / distance matrices must be symmetric
Stacktrace:
[1] SimpleGraph{Int64}(::Array{Float64,2}) at /home/user/.julia/packages/LightGraphs/PPsyP/src/SimpleGraphs/simplegraph.jl:78
[2] SimpleGraph(::Array{Float64,2}) at /home/user/.julia/packages/LightGraphs/PPsyP/src/SimpleGraphs/simplegraph.jl:72
[3] top-level scope at none:0
So far I have only seen the example on the github (https://github.com/JuliaGraphs/SimpleWeightedGraphs.jl) page which generates the weighted graph from and edgelist. However, I would prefer if I could generate the graph directly from an adjacency matrix.