Undirected graph implementation.