In Python, I have a Graph class that has a dictionary of vertex objects. Each vertex object has a dictionary of edges (which consist of a starting node, ending node, and a weight...imagine the end of arrow pointing to another node with a cost-to-travel number assigned to it).
With these classes, I'm graphing--well, a graph--for the time it takes for planes to fly from city to city. From this graph, I'm supposed to determine the shortest-path (fastest-path) between two nodes using Dijkstra's algorithm. I'm also supposed to determine all the vertices reachable from a starting vertex.
I'm able to add edges and delete edges (and consequently, add nodes) perfectly in the Graph. However, for the life of me, I can not seem to figure out a simple way to implement Dijkstra's algorithm or Breadth-First Search (to determine the reachable vertices) using the data structures I have created.
If anyone could suggest what I need to do to alter or implement these algorithms so that they work correctly, I would greatly appreciate any help. This is a homework assignment that I have been working on for nearly a week, many hours per day, and I just can't seem to get passed this wall. Again, I would appreciate any advice or help. I'm not expecting anyone to write code for me, but pseudocode would help (and applying it--copying and pasting pseudocode from Wikipedia won't help me out as I've already been there).