Dune Core Modules (2.8.0)
reserveddeque.hh
Go to the documentation of this file.
A double-ended queue (deque) class with statically reserved memory.
Definition: reserveddeque.hh:45
void pop_front()
Erases the first element of the vector, O(1) time.
Definition: reserveddeque.hh:126
static constexpr size_type capacity()
Returns current capacity (allocated memory) of the vector.
Definition: reserveddeque.hh:214
void clear()
Erases all elements.
Definition: reserveddeque.hh:89
Dune::GenericIterator< ReservedDeque, value_type > iterator
Iterator used to iterate through a vector.
Definition: reserveddeque.hh:63
T value_type
The type of object, T, stored in the vector.
Definition: reserveddeque.hh:51
ReservedDeque()
Constructor.
Definition: reserveddeque.hh:72
bool empty() const
Returns true if vector has no elements.
Definition: reserveddeque.hh:208
const_reference back() const
Returns const reference to last element of vector.
Definition: reserveddeque.hh:191
friend std::ostream & operator<<(std::ostream &s, const ReservedDeque &v)
Send ReservedDeque to an output stream.
Definition: reserveddeque.hh:228
void push_front(const T &t)
Prepends an element to the begin of a deque if size<capacity, O(1) time.
Definition: reserveddeque.hh:110
reference operator[](size_type i)
Returns reference to the i'th element.
Definition: reserveddeque.hh:156
reference front()
Returns reference to first element of vector.
Definition: reserveddeque.hh:170
const_reference front() const
Returns const reference to first element of vector.
Definition: reserveddeque.hh:177
iterator end()
Returns an iterator pointing to the end of the vector.
Definition: reserveddeque.hh:146
reference back()
Returns reference to last element of vector.
Definition: reserveddeque.hh:184
void pop_back()
Erases the last element of the vector, O(1) time.
Definition: reserveddeque.hh:119
const T & const_reference
Const reference to T.
Definition: reserveddeque.hh:57
static constexpr size_type max_size()
Returns the maximum length of the vector.
Definition: reserveddeque.hh:220
std::ptrdiff_t difference_type
A signed integral type.
Definition: reserveddeque.hh:61
T & reference
Reference to T.
Definition: reserveddeque.hh:55
Dune::GenericIterator< const ReservedDeque, const value_type > const_iterator
Const iterator used to iterate through a vector.
Definition: reserveddeque.hh:65
size_type size() const
Returns number of elements in the vector.
Definition: reserveddeque.hh:202
const_iterator end() const
Returns a const_iterator pointing to the end of the vector.
Definition: reserveddeque.hh:151
void resize(size_t s)
Specifies a new size for the vector.
Definition: reserveddeque.hh:96
iterator begin()
Returns a iterator pointing to the beginning of the vector.
Definition: reserveddeque.hh:136
const_iterator begin() const
Returns a const_iterator pointing to the beginning of the vector.
Definition: reserveddeque.hh:141
size_t size_type
An unsigned integral type.
Definition: reserveddeque.hh:59
void push_back(const T &t)
Appends an element to the end of a vector, up to the maximum size n, O(1) time.
Definition: reserveddeque.hh:103
Generic class for stl-conforming iterators for container classes with operator[].
Definition: genericiterator.hh:151
Implements a generic iterator class for writing stl conformant iterators.
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 21, 23:30, 2024)