Bug introduced in 9.0 or earlier, fixed in 11.3
I have a graph:
g = RandomGraph[{1, 0}]
So basically, it is just one vertex. I want to add some vertices and edges in the following steps so i tried this first to add a new vertex:
g = VertexAdd[g, VertexCount[g] + 1];
Since the vertex names are just numbers, I added the next unused integer. I want my g
graph to be updated (have a new vertex added to it) to the new state so I used the =
operator.
Then I tried to add an edge between those by using the EdgeAdd
function:
g = EdgeAdd[g, {1\[UndirectedEdge]2}]
And the output is just:
EdgeAdd[, 2<->3]
Why is it not working? Is it some kind of bug or am i using something wrong here?
RandomGraph[{1,0}] =!= Graph[{1}, {}]
despite the fact that they have identicalFullForm
s, andHash
to the same value. $\endgroup$