Scaffolding  0.1
This program can assemble genome scaffolds using the pairing information in paired-end reads.
Public Types | Public Member Functions | List of all members
std::set_queue< T, Priority, Compare > Class Template Reference

a priority-queue allowing member queries More...

#include <set_queue.hpp>

Public Types

typedef T_to_Prio_Type::iterator iterator
 iterators will point to objects in the map of objects to priorities
 
typedef T_to_Prio_Type::const_iterator const_iterator
 

Public Member Functions

 set_queue (const Compare &_comp=Compare())
 construct with comparator
 
const_iterator & cbegin () const
 
const_iterator & cend () const
 
bool empty () const
 return whether the set_queue is empty
 
std::pair< const_iterator, bool > insert (const T &element, const Priority &prio)
 insert an element into the set_queue and return whether it was newly inserted More...
 
const_iterator & find (const T &element) const
 find an element in the set_queue
 
std::pair< Priority, bool > get_priority (const T &element) const
 get priority of an element More...
 
const const_iterator get_min_element () const
 get an element of minimum priority More...
 
void erase (const const_iterator &iter)
 remove an element from the queue, given its iterator
 
bool erase (const T &element)
 remove an element from the queue, given the element More...
 
void set_priority (const const_iterator &iter, const Priority &prio, const bool update_only=false)
 modify the priority of an element, given an iterator More...
 
bool set_priority (const T &element, const Priority &prio, const bool update_only=false)
 modify the priority of a given element, return whether the element was found in the queue More...
 
void update_priority (const const_iterator &iter, const Priority &prio)
 update the priority of an element, given an iterator More...
 
bool update_priority (const T &element, const Priority &prio)
 update the priority of a given element, return success More...
 
void clear ()
 clear the container
 

Detailed Description

template<typename T, typename Priority, class Compare = std::less<Priority>>
class std::set_queue< T, Priority, Compare >

a priority-queue allowing member queries

Member Function Documentation

template<typename T , typename Priority , class Compare = std::less<Priority>>
bool std::set_queue< T, Priority, Compare >::erase ( const T &  element)
inline

remove an element from the queue, given the element

return whether the element previously existed in the queue

template<typename T , typename Priority , class Compare = std::less<Priority>>
const const_iterator std::set_queue< T, Priority, Compare >::get_min_element ( ) const
inline

get an element of minimum priority

undefined if the queue is empty

template<typename T , typename Priority , class Compare = std::less<Priority>>
std::pair<Priority, bool> std::set_queue< T, Priority, Compare >::get_priority ( const T &  element) const
inline

get priority of an element

returns the priority and a bool indicating success (false iff element is not found in the set queue)

template<typename T , typename Priority , class Compare = std::less<Priority>>
std::pair<const_iterator, bool> std::set_queue< T, Priority, Compare >::insert ( const T &  element,
const Priority &  prio 
)
inline

insert an element into the set_queue and return whether it was newly inserted

if the element is already present in the set_queue, update its priority

template<typename T , typename Priority , class Compare = std::less<Priority>>
void std::set_queue< T, Priority, Compare >::set_priority ( const const_iterator &  iter,
const Priority &  prio,
const bool  update_only = false 
)
inline

modify the priority of an element, given an iterator

if update_only is true and not comp(new_prio, old_prio), then don't overwrite the priority

template<typename T , typename Priority , class Compare = std::less<Priority>>
bool std::set_queue< T, Priority, Compare >::set_priority ( const T &  element,
const Priority &  prio,
const bool  update_only = false 
)
inline

modify the priority of a given element, return whether the element was found in the queue

if update_only is true and not comp(new_prio, old_prio), then don't overwrite the priority

template<typename T , typename Priority , class Compare = std::less<Priority>>
void std::set_queue< T, Priority, Compare >::update_priority ( const const_iterator &  iter,
const Priority &  prio 
)
inline

update the priority of an element, given an iterator

only overwrite priority if comp(prio, old_prio)

template<typename T , typename Priority , class Compare = std::less<Priority>>
bool std::set_queue< T, Priority, Compare >::update_priority ( const T &  element,
const Priority &  prio 
)
inline

update the priority of a given element, return success

only overwrite priority if comp(prio, old_prio)


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