#ifndef PRIORITYQUEUE #define PRIORITYQUEUE #include "Exceptions.h" /* * This defines a less-generic form of a priority queue which has * only a single template parameter, for the element type. * * They key must be of type double and the comparisons will be based upon * the standard built-in less-than operator. */ template class PriorityQueue { public: // number of items virtual int size() const =0; // is the queue empty? virtual bool isEmpty() const =0; // insert into queue virtual void insertItem(double k, const Element& e) =0; // returns element with min key virtual Element& minElement() throw(EmptyContainerException) =0; // returns minimum key virtual double minKey() const throw(EmptyContainerException) =0; // remove minimum virtual void removeMin() throw(EmptyContainerException) =0; // destructor virtual ~PriorityQueue() {}; }; #endif