Added a constructor which generates a random graph (not guaranteed to be connected, yet).