Read/Write methods for graph representation.