Directed graphs API
Use an interface to allow dfs/bfs on both graph and digraph