amend the graph.h graph.cpp

mainly amend the way to store nodes and it’s net id