Graph data paramater in visit/cost callbacks is redundant.