Scippy

SCIP

Solving Constraint Integer Programs

std::pqueue< Key, Data, Compare > Class Template Reference

Detailed Description

template<typename Key, typename Data, typename Compare = less<Key>>
class std::pqueue< Key, Data, Compare >

Definition at line 44 of file pqueue.h.

#include <pqueue.h>

Public Types

typedef node * pqueue_item
 

Public Member Functions

 pqueue ()
 
 ~pqueue ()
 
void clear ()
 
bool empty () const
 
int size () const
 
const Key & get_key (pqueue_item it) const
 
const Data & get_data (pqueue_item it) const
 
pqueue_item top ()
 
pqueue_item insert (const Key &key, const Data &data)
 
void decrease_key (pqueue_item item, const Key &new_key)
 
void pop ()
 
void remove (node *item)
 

Member Typedef Documentation

◆ pqueue_item

template<typename Key , typename Data , typename Compare = less<Key>>
typedef node* std::pqueue< Key, Data, Compare >::pqueue_item

Definition at line 102 of file pqueue.h.

Constructor & Destructor Documentation

◆ pqueue()

template<typename Key , typename Data , typename Compare = less<Key>>
std::pqueue< Key, Data, Compare >::pqueue ( )
inline

Default constructor, creates empty priority queue.

Definition at line 112 of file pqueue.h.

◆ ~pqueue()

template<typename Key , typename Data , typename Compare = less<Key>>
std::pqueue< Key, Data, Compare >::~pqueue ( )
inline

Destructs queue

Definition at line 117 of file pqueue.h.

References std::pqueue< Key, Data, Compare >::clear().

Member Function Documentation

◆ clear()

template<typename Key , typename Data , typename Compare = less<Key>>
void std::pqueue< Key, Data, Compare >::clear ( )
inline

Empties queue

Definition at line 123 of file pqueue.h.

References NULL.

Referenced by std::pqueue< Key, Data, Compare >::~pqueue().

◆ empty()

template<typename Key , typename Data , typename Compare = less<Key>>
bool std::pqueue< Key, Data, Compare >::empty ( ) const
inline

Returns true if the pqueue is empty.

Definition at line 134 of file pqueue.h.

References NULL.

◆ size()

template<typename Key , typename Data , typename Compare = less<Key>>
int std::pqueue< Key, Data, Compare >::size ( ) const
inline

Returns size of queue.

Definition at line 140 of file pqueue.h.

References NULL.

◆ get_key()

template<typename Key , typename Data , typename Compare = less<Key>>
const Key& std::pqueue< Key, Data, Compare >::get_key ( pqueue_item  it) const
inline

Returns key of queue item.

Definition at line 146 of file pqueue.h.

References NULL.

◆ get_data()

template<typename Key , typename Data , typename Compare = less<Key>>
const Data& std::pqueue< Key, Data, Compare >::get_data ( pqueue_item  it) const
inline

Returns data of queue item.

Definition at line 155 of file pqueue.h.

References NULL.

◆ top()

template<typename Key , typename Data , typename Compare = less<Key>>
pqueue_item std::pqueue< Key, Data, Compare >::top ( )
inline

Returns queue item at top (with lowers key).

Definition at line 164 of file pqueue.h.

◆ insert()

template<typename Key , typename Data , typename Compare = less<Key>>
pqueue_item std::pqueue< Key, Data, Compare >::insert ( const Key &  key,
const Data &  data 
)
inline

Inserts a new entry into the queue, returns new item

Definition at line 170 of file pqueue.h.

References NULL.

◆ decrease_key()

template<typename Key , typename Data , typename Compare = less<Key>>
void std::pqueue< Key, Data, Compare >::decrease_key ( pqueue_item  item,
const Key &  new_key 
)
inline

Reduces the key a queue item.

Definition at line 191 of file pqueue.h.

◆ pop()

template<typename Key , typename Data , typename Compare = less<Key>>
void std::pqueue< Key, Data, Compare >::pop ( )
inline

Removes the topmost item from the queue.

Definition at line 204 of file pqueue.h.

References NULL.

◆ remove()

template<typename Key , typename Data , typename Compare = less<Key>>
void std::pqueue< Key, Data, Compare >::remove ( node *  item)
inline

Removes the item from the queue

Definition at line 211 of file pqueue.h.

References NULL.