?? priorityqueue.h
字號:
#ifndef PRIORITY_QUEUE#define PRIORITY_QUEUE#include <map>#include <list>#include <set>#include <algorithm>using namespace std;class PriorityQueue{ public: PriorityQueue() { clear();} void clear(){queue.clear();} bool empty() {return queue.empty();} PP_Point* getNext() { PP_Point* next=(*queue.begin()).second; queue.erase(queue.begin()); return next; } void add(double q, PP_Point* p) { pair<double,PP_Point*> aux(q,p); queue.insert(aux); //queue[q].push_back(p); } private: multimap<double,PP_Point*> queue; // map<double,list<PP_Point*> > queue;};#endif/********************************************************************* * (C) Copyright 2006 Albert Ludwigs University Freiburg * Institute of Computer Science * * All rights reserved. Use of this software is permitted for * non-commercial research purposes, and it may be copied only * for that use. All copies must include this copyright message. * This software is made available AS IS, and neither the authors * nor the Albert Ludwigs University Freiburg make any warranty * about the software or its performance. *********************************************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -