added digraph
common implementation of Directed + Undirected graphs