⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 priorityqueue.h

📁 一个非常有用的客户端开发程序
💻 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 + -