Graph with nodes and edges, with shortest path implementation