template<typename Key, typename Container, typename Compare>
struct cugar::priority_queue< Key, Container, Compare >
A priority queue adaptor, that can be built on top of any user-provided container
- Template Parameters
-
Key | the key type |
Container | the underlying container used to hold keys, must implement push_back(), size(), resize(), clear() |
Compare | the comparison binary functor, Compare(a,b) == true iff a < b |
#include <priority_queue.h>
|
typedef Key | value_type |
|
typedef Container | container_type |
|
typedef container_type::const_iterator | const_iterator |
|
typedef const_iterator | iterator |
|
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE | priority_queue (Container cont=Container(), const Compare cmp=Compare()) |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool | empty () const |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 | size () const |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void | push (const Key key) |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void | pop () |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Key & | top () |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Key | top () const |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const Key & | operator[] (const uint32 i) const |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void | clear () |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator | begin () const |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator | begin () |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator | end () const |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator | end () |
|
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator | upper_bound (const Key &x) |
|
|
uint32 | m_size |
|
Container | m_queue |
|
Compare | m_cmp |
|
◆ priority_queue()
template<typename Key , typename Container , typename Compare >
◆ begin() [1/2]
template<typename Key, typename Container, typename Compare>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator cugar::priority_queue< Key, Container, Compare >::begin |
( |
| ) |
const |
|
inline |
◆ begin() [2/2]
template<typename Key, typename Container, typename Compare>
◆ clear()
template<typename Key , typename Container , typename Compare >
◆ empty()
template<typename Key , typename Container , typename Compare >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool cugar::priority_queue< Key, Container, Compare >::empty |
( |
| ) |
const |
◆ end() [1/2]
template<typename Key, typename Container, typename Compare>
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator cugar::priority_queue< Key, Container, Compare >::end |
( |
| ) |
const |
|
inline |
◆ end() [2/2]
template<typename Key, typename Container, typename Compare>
◆ operator[]()
template<typename Key , typename Container , typename Compare >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const Key & cugar::priority_queue< Key, Container, Compare >::operator[] |
( |
const uint32 |
i | ) |
const |
return the i-th element in the heap
◆ pop()
template<typename Key , typename Container , typename Compare >
◆ push()
template<typename Key , typename Container , typename Compare >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void cugar::priority_queue< Key, Container, Compare >::push |
( |
const Key |
key | ) |
|
◆ size()
template<typename Key , typename Container , typename Compare >
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 cugar::priority_queue< Key, Container, Compare >::size |
( |
| ) |
const |
◆ top() [1/2]
template<typename Key , typename Container , typename Compare >
◆ top() [2/2]
template<typename Key , typename Container , typename Compare >
◆ upper_bound()
template<typename Key , typename Container , typename Compare >
locate the largest element v such that v <= x; return end() if no such element exists
The documentation for this struct was generated from the following files: