I interested to create a weighted graph from the sparse matrix of weights.
The following code works for small examples, but to the graph, with few thousands of node, it does not work.
arrayR = {{1, 2} -> 1.6608834828359216`, {1, 3} ->
1.3176250784021715`, {2, 1} -> 1.6608834828359216`, {2, 3} ->
3.8979590937707167`, {2, 4} -> 2.058499550409593`, {3, 1} ->
1.3176250784021715`, {3, 2} -> 3.8979590937707167`, {3, 4} ->
1.0569052092863416`, {4, 2} -> 2.058499550409593`, {4, 3} ->
1.0569052092863416`, {_, _} -> 0};
WeightedAdjacencyGraph[SparseArray[arrayR /. {0 -> Infinity}]]
Any suggestion on how to do it with big graphs?
WeightedAdjacencyGraph[SparseArray[Most @ arrayR, {numberofnodes, numberofnodes}, ∞]]
? $\endgroup$