Directed/Undirected graph class