Overrode add_vertex method in DomainGraph class.