DUNE PDELab (git)
reserveddeque.hh
Go to the documentation of this file.
A double-ended queue (deque) class with statically reserved memory.
Definition: reserveddeque.hh:49
void pop_front()
Erases the first element of the vector, O(1) time.
Definition: reserveddeque.hh:130
static constexpr size_type capacity()
Returns current capacity (allocated memory) of the vector.
Definition: reserveddeque.hh:218
void clear()
Erases all elements.
Definition: reserveddeque.hh:93
Dune::GenericIterator< ReservedDeque, value_type > iterator
Iterator used to iterate through a vector.
Definition: reserveddeque.hh:67
T value_type
The type of object, T, stored in the vector.
Definition: reserveddeque.hh:55
ReservedDeque()
Constructor.
Definition: reserveddeque.hh:76
bool empty() const
Returns true if vector has no elements.
Definition: reserveddeque.hh:212
const_reference back() const
Returns const reference to last element of vector.
Definition: reserveddeque.hh:195
friend std::ostream & operator<<(std::ostream &s, const ReservedDeque &v)
Send ReservedDeque to an output stream.
Definition: reserveddeque.hh:232
void push_front(const T &t)
Prepends an element to the begin of a deque if size<capacity, O(1) time.
Definition: reserveddeque.hh:114
reference operator[](size_type i)
Returns reference to the i'th element.
Definition: reserveddeque.hh:160
reference front()
Returns reference to first element of vector.
Definition: reserveddeque.hh:174
const_reference front() const
Returns const reference to first element of vector.
Definition: reserveddeque.hh:181
iterator end()
Returns an iterator pointing to the end of the vector.
Definition: reserveddeque.hh:150
reference back()
Returns reference to last element of vector.
Definition: reserveddeque.hh:188
void pop_back()
Erases the last element of the vector, O(1) time.
Definition: reserveddeque.hh:123
const T & const_reference
Const reference to T.
Definition: reserveddeque.hh:61
static constexpr size_type max_size()
Returns the maximum length of the vector.
Definition: reserveddeque.hh:224
std::ptrdiff_t difference_type
A signed integral type.
Definition: reserveddeque.hh:65
T & reference
Reference to T.
Definition: reserveddeque.hh:59
Dune::GenericIterator< const ReservedDeque, const value_type > const_iterator
Const iterator used to iterate through a vector.
Definition: reserveddeque.hh:69
size_type size() const
Returns number of elements in the vector.
Definition: reserveddeque.hh:206
const_iterator end() const
Returns a const_iterator pointing to the end of the vector.
Definition: reserveddeque.hh:155
void resize(size_t s)
Specifies a new size for the vector.
Definition: reserveddeque.hh:100
iterator begin()
Returns a iterator pointing to the beginning of the vector.
Definition: reserveddeque.hh:140
const_iterator begin() const
Returns a const_iterator pointing to the beginning of the vector.
Definition: reserveddeque.hh:145
size_t size_type
An unsigned integral type.
Definition: reserveddeque.hh:63
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:107
Generic class for stl-conforming iterators for container classes with operator[].
Definition: genericiterator.hh:153
Implements a generic iterator class for writing stl conformant iterators.
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 12, 23:30, 2024)