I am trying to add weights to the edges of the randomly generated graph as follows:
gErdosSmall = RandomGraph[BernoulliGraphDistribution[10, 0.1],
DirectedEdges -> True,
EdgeWeight -> RandomReal[{1, 5}, 10]]
But then is I try to get the weighted adjacency matrix of this random graph:
WeightedAdjacencyMatrix[gErdosSmall] // MatrixForm
I get an error saying
"A graph object is expected at position 1 in WeightedAdjacencyMatrix".
Clearly, I am missing something really obvious - what is it?