Question Description
Micro Assignment – Dijkstra’s Algorithm
For this micro assignment, you must implement the function that executes Dijkstra's shortest path algorithm inside Graph.h. The function is called dijkstra( int startingID ). It’s found at the very end of the file.
I’ve left in a timesaver test on dijkstra’s that only re-runs the algorithm if it’s from a new starting point than you ran it last time. This comes into play when you query for paths in the graph since they first call dijkstra’s to make sure they have a valid data path to test.
You’ll find that all of the vertices have ID numbers for their names. These are integers and they match the bucket they live in inside of graph._vertices. This is a total time saver and simplifying approach that I used for this implementation. They *should* be kept in an unordered_map<string, Vertex*> instead of a simple vector, but I don’t have time to re-do everything this term.
The graph we’re testing with is the same one from the book in Chapter 9 (page 394). I’ve added a single node with ID #0 that’s disconnected from the graph to show that you can’t reach the node. I’m using a library to provide a path weight of infinity and it shows up in the double type as ‘inf’.
When you run ‘make bigtest’ you’ll see it takes a while to run the Mouse Brain test. That’s a second graph in MouseBrainGraph.dot with about 216 vertices and 21k edges (give or take).
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.