| 
    MTC
    
   | 
 
ordered<ValueType> provides an adapter for a std::list to allow sorting. More...
#include <cost_queue.h>
Public Member Functions | |
| ordered () | |
| initialize empty container  | |
| bool | empty () const | 
| size_type | size () const | 
| void | clear () | 
| reference | top () | 
| const_reference | top () const | 
| value_type | pop () | 
| reference | front () | 
| const_reference | front () const | 
| reference | back () | 
| const_reference | back () const | 
| iterator | begin () | 
| iterator | end () | 
| const_iterator | begin () const | 
| const_iterator | end () const | 
| const_iterator | cbegin () const | 
| const_iterator | cend () const | 
| const_reverse_iterator | rbegin () const | 
| const_reverse_iterator | rend () const | 
| const_reverse_iterator | crbegin () const | 
| const_reverse_iterator | crend () const | 
| void | sort () | 
| explicitly sort container, useful if many items have changed their value  | |
| iterator | insert (const value_type &item) | 
| iterator | insert (value_type &&item) | 
| void | push (const value_type &item) | 
| void | push (value_type &&item) | 
| iterator | erase (const_iterator pos) | 
| iterator | update (iterator &it) | 
| update sort position of a single item after changes  | |
| iterator | moveTo (iterator pos, container_type &other, iterator other_pos) | 
| move element pos from this to other container, inserting before other_pos  | |
| iterator | moveFrom (iterator pos, container_type &other) | 
| move element pos from other container into this one (sorted)  | |
| template<typename Predicate > | |
| void | remove_if (Predicate p) | 
Protected Attributes | |
| container_type | c | 
| Compare | comp | 
ordered<ValueType> provides an adapter for a std::list to allow sorting.
In contrast to std::priority_queue, we use a std::list as the underlying container. This ensures, that existing iterators remain valid upon insertion and deletion. Sorted insertion has logarithmic complexity.