|
Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
Class extending the vector class from the standard library. Original reason is to allow printing of the container with overloaded operator <<. More...
#include <vector.hpp>
Public Types | |
| using | iterator = typename std::vector< T, Alloc >::iterator |
| The type of values iterator. More... | |
| using | const_iterator = typename std::vector< T, Alloc >::const_iterator |
| The type of constant values iterator. More... | |
| using | reverse_iterator = typename std::vector< T, Alloc >::reverse_iterator |
| The type of reverse values iterator. More... | |
| using | const_reverse_iterator = typename std::vector< T, Alloc >::const_reverse_iterator |
| The type of constant reverse values iterator. More... | |
Public Member Functions | |
| vector ()=default | |
| vector (const vector &other)=default | |
| vector (vector &&other)=default | |
| vector & | operator= (vector &&other)=default |
| vector & | operator= (const vector &other)=default |
| template<class Iterator > | |
| vector (const ext::iterator_range< Iterator > &range) | |
| auto | begin () & |
| Inherited behavior of begin for non-const instance. More... | |
| auto | begin () const & |
| Inherited behavior of begin for const instance. More... | |
| auto | begin () && |
| Inherited behavior of begin for rvalues. More... | |
| auto | end () & |
| Inherited behavior of end for non-const instance. More... | |
| auto | end () const & |
| Inherited behavior of end for const instance. More... | |
| auto | end () && |
| Inherited behavior of end for rvalues. More... | |
| auto | range () & |
| Make range of non-const begin to end iterators. More... | |
| auto | range () const & |
| Make range of non-const begin to end iterators. More... | |
| auto | range () && |
| Make range of move begin to end iterators. More... | |
| reverse_iterator | insert (const_reverse_iterator pos, const T &value) |
Inserts the value on position given by iterator pos. More... | |
| reverse_iterator | insert (const_reverse_iterator pos, T &&value) |
Inserts the value on position given by iterator pos. More... | |
| reverse_iterator | insert (const_reverse_iterator pos, size_t count, const T &value) |
Inserts the count copies of value on position given by iterator pos. More... | |
| template<class InputIt > | |
| reverse_iterator | insert (const_reverse_iterator pos, InputIt first, InputIt last) |
Inserts the values from the given range to positions starting at given iterator pos. More... | |
| reverse_iterator | insert (const_reverse_iterator pos, std::initializer_list< T > ilist) |
Inserts the values from the given initializer list to positions starting at given iterator pos. More... | |
| template<class ... Args> | |
| reverse_iterator | emplace (const_reverse_iterator pos, Args &&... args) |
Inserts a new value to the container at position given by parameter pos. The new value is constructed inside the method from constructor parameters. More... | |
| iterator | erase (iterator pos) |
Removes element from the container at position given by parameter pos. More... | |
| reverse_iterator | erase (reverse_iterator pos) |
Removes element from the container at position given by parameter pos. More... | |
| reverse_iterator | erase (const_reverse_iterator pos) |
Removes element from the container at position given by parameter pos. More... | |
| iterator | erase (iterator first, iterator last) |
Removes elements from the container in range given parameters first and last. More... | |
| reverse_iterator | erase (reverse_iterator first, reverse_iterator last) |
Removes elements from the container in range given parameters first and last. More... | |
| reverse_iterator | erase (const_reverse_iterator first, const_reverse_iterator last) |
Removes elements from the container in range given parameters first and last. More... | |
Class extending the vector class from the standard library. Original reason is to allow printing of the container with overloaded operator <<.
The class mimics the behavior of the vector from the standatd library.
| T | the type of values inside the vector |
| Alloc | the allocator of values of type T |
| using ext::vector< T, Alloc >::const_iterator = typename std::vector < T, Alloc >::const_iterator |
The type of constant values iterator.
| using ext::vector< T, Alloc >::const_reverse_iterator = typename std::vector < T, Alloc >::const_reverse_iterator |
The type of constant reverse values iterator.
| using ext::vector< T, Alloc >::iterator = typename std::vector < T, Alloc >::iterator |
The type of values iterator.
| using ext::vector< T, Alloc >::reverse_iterator = typename std::vector < T, Alloc >::reverse_iterator |
The type of reverse values iterator.
|
default |
Default constructor needed by g++ since it is not inherited
|
default |
Copy constructor needed by g++ since it is not inherited
|
default |
Move constructor needed by g++ since it is not inherited
|
inlineexplicit |
Constructor from range of values.
| Iterator | the type of range iterator |
| range | the source range |
|
inline |
Inherited behavior of begin for non-const instance.
|
inline |
Inherited behavior of begin for rvalues.
|
inline |
Inherited behavior of begin for const instance.
|
inline |
Inserts a new value to the container at position given by parameter pos. The new value is constructed inside the method from constructor parameters.
| Args | ... the types of arguments of the T constructor |
| pos | the position to set |
| args | ... the arguments of the T constructor |
|
inline |
Inherited behavior of end for non-const instance.
|
inline |
Inherited behavior of end for rvalues.
|
inline |
Inherited behavior of end for const instance.
|
inline |
Removes elements from the container in range given parameters first and last.
| first | the begining of the removed range |
| last | the end of the removed range |
|
inline |
Removes element from the container at position given by parameter pos.
| pos | the iterator pointing to the value to removed |
|
inline |
Removes elements from the container in range given parameters first and last.
| first | the begining of the removed range |
| last | the end of the removed range |
|
inline |
Removes element from the container at position given by parameter pos.
| pos | the iterator pointing to the value to removed |
|
inline |
Removes elements from the container in range given parameters first and last.
| first | the begining of the removed range |
| last | the end of the removed range |
|
inline |
Removes element from the container at position given by parameter pos.
| pos | the iterator pointing to the value to removed |
|
inline |
Inserts the value on position given by iterator pos.
| pos | the position to insert at |
| value | the value to insert |
|
inline |
Inserts the values from the given range to positions starting at given iterator pos.
| InputIt | the iterator type |
| first | the begining of the range |
| last | the end of the range |
|
inline |
Inserts the count copies of value on position given by iterator pos.
| pos | the position to insert at |
| count | the number of copies to insert |
| value | the value to insert |
|
inline |
Inserts the values from the given initializer list to positions starting at given iterator pos.
| pos | the position to insert at |
| ilist | the initializer list |
|
inline |
Inserts the value on position given by iterator pos.
| pos | the position to insert at |
| value | the value to insert |
|
default |
Move operator = needed by g++ since it is not inherited
|
default |
Copy operator = needed by g++ since it is not inherited
|
inline |
Make range of non-const begin to end iterators.
|
inline |
Make range of move begin to end iterators.
|
inline |
Make range of non-const begin to end iterators.