Add a method to read the structure of a graph.