constructors in graph.h