Template Class TieredVector
Defined in File TieredVector.h
Nested Relationships
Nested Types
Class Documentation
-
template<class T>
class TieredVector a sequence with access in O( 1 ) and insertion and removal anywhere in O( sqrt n ), in circular blocks of b items
Public Functions
-
TieredVector(void) = default
-
inline bool empty(void) const
-
inline std::size_t size(void) const
-
inline std::size_t block(void) const
the items of a block
-
void insert(std::size_t i, const T &x)
x at the index i, the items from i one place on
- Pre:
i <= size()
-
void erase(std::size_t i)
removes the item at the index i, the items after it one place back
- Pre:
i < size()
-
inline void pop_back(void)
- Pre:
the vector is not empty
-
void clear(void)
-
inline const_iterator begin(void) const
-
inline const_iterator end(void) const
-
inline const_iterator cbegin(void) const
-
inline const_iterator cend(void) const
-
template<bool Const>
class Iterator the iterator by index, random access, on items const if Const
Public Types
-
using iterator_category = std::random_access_iterator_tag
-
using difference_type = std::ptrdiff_t
Public Functions
-
Iterator(void) = default
-
inline Iterator(Owner *v, std::size_t i)
-
inline reference operator[](difference_type k) const
-
inline Iterator &operator+=(difference_type k)
-
inline Iterator &operator-=(difference_type k)
Friends
-
inline friend Iterator operator+(Iterator a, difference_type k)
-
inline friend Iterator operator+(difference_type k, Iterator a)
-
inline friend Iterator operator-(Iterator a, difference_type k)
-
inline friend difference_type operator-(const Iterator &a, const Iterator &b)
-
using iterator_category = std::random_access_iterator_tag
-
TieredVector(void) = default