I have created an application that deals with creating methods to insert vertices, edges, fetch vertices, edges, delete vertices, edges, but I am having trouble with understanding how to implement the updatevertex and updateEdge methods. Here is what I do have so far. Please do comment what you think I can improve about my application. Thanks!
So, you've created a 2D space and given it sparse vertexes and edges running through it. But I cannot tell what you might do with this "model". Delete-vertex seems to do nothing but report whether the vertex previously existed. Is that the idea?
If a chicken that is half full crosses the road, will anyone hear it?
A slightly simpler way is to use a Set<Integer> for the vertices and a Set<Point>, the presence of a Point(x, y) meaning an edge between X and Y. If you extend the equals method of a Point so that Point(x, y) equals Point(y, x) you need half the size of Set<Point>in case of an undirected graph.