Added an method to return edges of the graph.