title: Generating a large undirected weighted graph
body: <p>A random large connected undirected graph in JAVA with 5K vertices and D density is to be generated. But generating an edge between random V1 and a random V2 is taking a lot of time.
  I tried eliminating a created edge from the list of all possible edges and then selecting a random one from the remaining edges, but again it is taking a lot of time. </p>
  
  <p>What do you think will be a fast way to generate the edges for the huge connected graph in a random fashion?</p>