So I'm trying to implement the graph. It would seem, all of the graph interface could be fully supported *without* really building a graph. And for this assignment, seems more reasonable. I'll assume that isn't what is wanted. But do we have to do graph traversals to answer all the questions of the interface? Like can't we keep a list of the vertices and edges to answer some of the questions?
If that is the case, how should we store the WebEdges? Should they be stored as the links in the WebVertex? If they aren't, how do you traverse the graph?
And actually, why do we even need the WebEdge? Why can't we just store a list of WebVertices on each WebVertex to which it points? Isn't that a graph?
So, for the extra credit, do we need to use the graph as set up by the original files, or can we use our own? (WebVertices connected to other WebVertices).
Thanks |