Add Graph constructor that generates random graph.