Refinement of ScalaGraph: distinction between undirected graph and directed graph