I have two random graphs G1 and G2 that I want to join with an edge from a particular vertex vx in G1 to a particular vertex vy in G2. I can't find a way to do it.
Here is my latest code:
(* Generate Two Random Barabasi Albert with order up to 30 *)
go1=RandomInteger[{1,30}];
go2 =RandomInteger[{1,30}];
G1=RandomGraph[BarabasiAlbertGraphDistribution[go1,2],VertexLabels->Automatic];
G2 =RandomGraph[BarabasiAlbertGraphDistribution[go2,2],VertexLabels->Automatic];
(* Perform disjoint union to make one graphy with succesive vertices *)
G=GraphDisjointUnion[G1,G2,VertexLabels->Automatic];
(* one random vertex from each graph G1, and G2 *)
v1=RandomChoice[Range[go1]];
v2=RandomChoice[Range[go1+1,go1+go2,1]];
G =EdgeAdd[G,v1\[UndirectedEdge]v2, PlotLabel->"Random Edge Connection between G1 and G2"]