Generating Random Networks and Graphs