abstracting the edge iterator in the Graph interface
abstracting visitors to factorize common behabior
refactor visitor