Priority Queue Assignment 5 Added:  Function toString() which is available for

Priority Queue Assignment 5 Added:  Function toString() which is available for every queue. It’s useful for debugging, you can call it during manual testing by typing command toString or str.  New data structures: Binomial and Fibonacci Heap. Also added test options for them in test menu.  Command Automatically test ALL priority queues in test menu which does automatic test on every queue. toString() notes:  Since its has no effect on queue’s functionality and is solely made for debugging, comments weren’t added.  Unsorted queues (Vector and Doubly Linked) will return unsorted list. Binomial Heap notes:  Head is an empty node and its sibling is first valid node, meaning that if head doesn’t have sibling, queue is empty.  When I mention root list in comments I’m referring to head’s siblings (see Fibonacci image on next page).  Here’s a visual representation of Binomial Heap with one order-2 heap: Fibonacci Heap notes:  The automatic and manual tests have been re-written with slight adjustments to match Fibonacci’s enqueue().  Automatic tests do not test decreaseKey() function. You can test this function in manual testing using decreaseKey or k command with str command.  cleanup() visualization, if it helps: link  Fibonacci Heap with order-0 and order-2 heaps: P.S – I used different version of Stanford’s library and even though I went through the entire code and tried to make it compatible with your version, there still could be few errors with your version. uploads/Litterature/ guide 40 .pdf

  • 28
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager