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

📄 priority_queue.cpp

📁 Data Abstraction & Problem Solving with C++源码
💻 CPP
字号:
template <class T, class Container = vector<T>,          class Compare = less<typename Container::value_type> >class priority_queuepublic:   explicit priority_queue(const Compare& = Compare(),                           const Container& = Container()) ;   // Default constructor; initializes an empty priority queue.   // The default comparison operator is <.    // A comparison function object may be supplied.    // Precondition: None.   // Postcondition: An empty priority queue exists.   bool empty() const;   // Determines whether the priority queue is empty.   // Precondition: None.   // Postcondition: Returns true if the priority queue is empty,   // otherwise returns false.    size_type size() const;   // Determines the size of the priority queue.   // The return type size_type is an integral type.    // Precondition: None.   // Postcondition: Returns the number of items that   // are currently in the priority queue.   const value_type& top() const;   // Returns a reference to the highest priority element in the   // priority queue.   // Precondition: None.   // Postcondition: The item remains at the top of the    // priority queue.   void pop();   // Removes the highest priority element in the   // priority queue   // Precondition: None.   // Postcondition: The priority queue has the highest priority   // element at the top.      void push(const value_type& e);   // Adds the item e to the priority queue   // Precondition: None.   // Postcondition: The priority queue has the highest priority   // element at the top.}  // end STL priority_queue 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -