Dear all,
I am starting to use Graphs.jl and some simple questions arrived. It is not
clear for me how to create a Graph from my data if my data is in a matrix
format, for example.
The documentation is plenty of information about how the classes, types,
and algorithms are defined, and they also provide some good examples to use
these functions once you have a graph object. But I couldn't find a clear
example about how to create a graph from my data. Let's suppose my data is
the matrix 'mat' (representing the distances between each pair of nodes in
my graph), as defined below:
julia> mat=rand(4,4);
julia> for i in 1:4
mat[i,i]=0;
end
julia> mat
4x4 Array{Float64,2}:
0.0 0.310287 0.497059 0.0472071
0.624904 0.0 0.256988 0.675347
0.305605 0.504063 0.0 0.915409
0.85426 0.145528 0.055314 0.0
Please forgive me if this information has been asked before and I didn't
find the correct reference. I would much appreciate any help.
Best wishes,
Charles
--
Um axé! :)
--
Charles Novaes de Santana, PhD
http://www.imedea.uib-csic.es/~charles