NeoPZ
Public Member Functions | Public Attributes | Protected Attributes | List of all members
TPZPriorityQueue< T, Container, Compare > Class Template Reference

#include <TPZPriorityQueue.h>

Collaboration diagram for TPZPriorityQueue< T, Container, Compare >:
[legend]

Public Member Functions

 TPZPriorityQueue ()
 
 TPZPriorityQueue (const TPZPriorityQueue &other)
 
TPZPriorityQueueoperator= (const TPZPriorityQueue &other)
 
void addItem (const T &item)
 
popTop ()
 
bool remove (T &value)
 
void remove (const typename Container::size_type begin, const typename Container::size_type end)
 
top ()
 
Container::size_type size () const
 
const T & getItem (const typename Container::size_type index) const
 
void pop ()
 
void pop_back (const typename Container::size_type count)
 
void push (T &item)
 
void push (const T &item)
 

Public Attributes

std::mutex mMutex
 

Protected Attributes

Container c
 
Compare comp
 

Detailed Description

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
class TPZPriorityQueue< T, Container, Compare >

Definition at line 10 of file TPZPriorityQueue.h.

Constructor & Destructor Documentation

◆ TPZPriorityQueue() [1/2]

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
TPZPriorityQueue< T, Container, Compare >::TPZPriorityQueue ( )
inline

Definition at line 13 of file TPZPriorityQueue.h.

◆ TPZPriorityQueue() [2/2]

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
TPZPriorityQueue< T, Container, Compare >::TPZPriorityQueue ( const TPZPriorityQueue< T, Container, Compare > &  other)
inline

Definition at line 17 of file TPZPriorityQueue.h.

Member Function Documentation

◆ addItem()

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
void TPZPriorityQueue< T, Container, Compare >::addItem ( const T &  item)
inline

Definition at line 30 of file TPZPriorityQueue.h.

Referenced by TPZThreadPool::appendTaskToQueue().

◆ getItem()

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
const T& TPZPriorityQueue< T, Container, Compare >::getItem ( const typename Container::size_type  index) const
inline

Definition at line 64 of file TPZPriorityQueue.h.

◆ operator=()

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
TPZPriorityQueue& TPZPriorityQueue< T, Container, Compare >::operator= ( const TPZPriorityQueue< T, Container, Compare > &  other)
inline

Definition at line 22 of file TPZPriorityQueue.h.

◆ pop()

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
void TPZPriorityQueue< T, Container, Compare >::pop ( )
inline

◆ pop_back()

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
void TPZPriorityQueue< T, Container, Compare >::pop_back ( const typename Container::size_type  count)
inline

Definition at line 72 of file TPZPriorityQueue.h.

◆ popTop()

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
T TPZPriorityQueue< T, Container, Compare >::popTop ( )
inline

Definition at line 35 of file TPZPriorityQueue.h.

Referenced by TPZThreadPool::threadsLoop().

◆ push() [1/2]

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
void TPZPriorityQueue< T, Container, Compare >::push ( T &  item)
inline

Definition at line 76 of file TPZPriorityQueue.h.

◆ push() [2/2]

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
void TPZPriorityQueue< T, Container, Compare >::push ( const T &  item)
inline

Definition at line 80 of file TPZPriorityQueue.h.

◆ remove() [1/2]

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
bool TPZPriorityQueue< T, Container, Compare >::remove ( T &  value)
inline

Definition at line 41 of file TPZPriorityQueue.h.

Referenced by TPZThreadPool::reschedule().

◆ remove() [2/2]

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
void TPZPriorityQueue< T, Container, Compare >::remove ( const typename Container::size_type  begin,
const typename Container::size_type  end 
)
inline

Definition at line 52 of file TPZPriorityQueue.h.

◆ size()

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
Container::size_type TPZPriorityQueue< T, Container, Compare >::size ( ) const
inline

◆ top()

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
T TPZPriorityQueue< T, Container, Compare >::top ( )
inline

Member Data Documentation

◆ c

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
Container TPZPriorityQueue< T, Container, Compare >::c
protected

◆ comp

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
Compare TPZPriorityQueue< T, Container, Compare >::comp
protected

◆ mMutex

template<class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type>>
std::mutex TPZPriorityQueue< T, Container, Compare >::mMutex
mutable

The documentation for this class was generated from the following file: