Algorithms: move Graph class definition to graph.h