a double ended queue with its least item, every operation in \( O( 1 ) \) worst-case time
More...
|
| | RealTimeMinDeque (C less=C()) |
| | the empty deque, ordered by less
|
| | RealTimeMinDeque (const RealTimeMinDeque &o) |
| | a copy, item by item, in \( O( n ) \) time
|
| | RealTimeMinDeque (RealTimeMinDeque &&o) noexcept |
| | the items of o, which is left empty
|
| RealTimeMinDeque & | operator= (const RealTimeMinDeque &o) |
| | the items of o, by copy and swap
|
| RealTimeMinDeque & | operator= (RealTimeMinDeque &&o) noexcept |
| | the items of o, exchanged with those of this deque
|
| void | swap (RealTimeMinDeque &o) noexcept |
| | exchanges the items with o
|
| bool | empty (void) const |
| | true if there is no item
|
| std::size_t | size (void) const |
| | the number \( n \) of items
|
| void | push_front (const T &x) |
| | \( x \) at the front, on \( F \)
|
| void | push_back (const T &x) |
| | \( x \) at the back, on \( B \)
|
| T | pop_front (void) |
| | removes the item at the front and returns it
|
| T | pop_back (void) |
| | removes the item at the back and returns it
|
| const T & | front (void) const |
| | the item at the front
|
| const T & | back (void) const |
| | the item at the back
|
| const T & | min (void) const |
| | the least item, the lesser of the minima of the two stacks
|
| template<class F> |
| void | forEach (F &&f) const |
| | f( x ) on the items from the front to the back, \( O( n ) \)
|
| void | clear (void) |
| | removes all the items
|
template<std::copy_constructible T, class C = std::less<>>
class ADS::RealTimeMinDeque< T, C >
a double ended queue with its least item, every operation in \( O( 1 ) \) worst-case time