ещё правки для PIVector и PIDeque iterator и убрал лишние строки

This commit is contained in:
Andrey
2022-04-22 17:54:08 +03:00
parent 8a9864a91c
commit 99a4546775
2 changed files with 32 additions and 214 deletions

View File

@@ -119,14 +119,12 @@ class PIDeque {
public: public:
typedef bool (*CompareFunc)(const T & , const T & ); typedef bool (*CompareFunc)(const T & , const T & );
//! \~\brief
//! \~english Constructs an empty array. //! \~english Constructs an empty array.
//! \~russian Создает пустой массив. //! \~russian Создает пустой массив.
inline PIDeque(): pid_data(0), pid_size(0), pid_rsize(0), pid_start(0) { inline PIDeque(): pid_data(0), pid_size(0), pid_rsize(0), pid_start(0) {
PIINTROSPECTION_CONTAINER_NEW(T, sizeof(T)) PIINTROSPECTION_CONTAINER_NEW(T, sizeof(T))
} }
//! \~\brief
//! \~english Copy constructor. //! \~english Copy constructor.
//! \~russian Копирующий конструктор. //! \~russian Копирующий конструктор.
inline PIDeque(const PIDeque<T> & other): pid_data(0), pid_size(0), pid_rsize(0), pid_start(0) { inline PIDeque(const PIDeque<T> & other): pid_data(0), pid_size(0), pid_rsize(0), pid_start(0) {
@@ -135,7 +133,6 @@ public:
newT(pid_data + pid_start, other.pid_data + other.pid_start, pid_size); newT(pid_data + pid_start, other.pid_data + other.pid_start, pid_size);
} }
//! \~\brief
//! \~english Contructs array from //! \~english Contructs array from
//! [C++11 initializer list](https://en.cppreference.com/w/cpp/utility/initializer_list). //! [C++11 initializer list](https://en.cppreference.com/w/cpp/utility/initializer_list).
//! \~russian Создает массив из //! \~russian Создает массив из
@@ -151,7 +148,6 @@ public:
newT(pid_data, init_list.begin(), init_list.size()); newT(pid_data, init_list.begin(), init_list.size());
} }
//! \~\brief
//! \~english Contructs array from raw `data`. //! \~english Contructs array from raw `data`.
//! This constructor reserve `size` and copy from `data` pointer. //! This constructor reserve `size` and copy from `data` pointer.
//! \~russian Создает массив из указателя на данные `data` и размер `size`. //! \~russian Создает массив из указателя на данные `data` и размер `size`.
@@ -162,7 +158,6 @@ public:
newT(pid_data + pid_start, data, pid_size); newT(pid_data + pid_start, data, pid_size);
} }
//! \~\brief
//! \~english Contructs array with size `size` filled elements `e`. //! \~english Contructs array with size `size` filled elements `e`.
//! \~russian Создает массив из `size` элементов заполненных `e`. //! \~russian Создает массив из `size` элементов заполненных `e`.
inline PIDeque(size_t pid_size, const T & e = T()): pid_data(0), pid_size(0), pid_rsize(0), pid_start(0) { inline PIDeque(size_t pid_size, const T & e = T()): pid_data(0), pid_size(0), pid_rsize(0), pid_start(0) {
@@ -170,7 +165,6 @@ public:
resize(pid_size, e); resize(pid_size, e);
} }
//! \~\brief
//! \~english Contructs array with size `size` and elements created by function `f(size_t i)`. //! \~english Contructs array with size `size` and elements created by function `f(size_t i)`.
//! \~russian Создает массив из `size` элементов созданных функцией `f(size_t i)`. //! \~russian Создает массив из `size` элементов созданных функцией `f(size_t i)`.
//! \~\details //! \~\details
@@ -189,7 +183,6 @@ public:
resize(piv_size, f); resize(piv_size, f);
} }
//! \~\brief
//! \~english Move constructor. //! \~english Move constructor.
//! \~russian Перемещающий конструктор. //! \~russian Перемещающий конструктор.
inline PIDeque(PIDeque<T> && other): pid_data(other.pid_data), pid_size(other.pid_size), pid_rsize(other.pid_rsize), pid_start(other.pid_start) { inline PIDeque(PIDeque<T> && other): pid_data(other.pid_data), pid_size(other.pid_size), pid_rsize(other.pid_rsize), pid_start(other.pid_start) {
@@ -205,7 +198,6 @@ public:
_reset(); _reset();
} }
//! \~\brief
//! \~english Assign operator. //! \~english Assign operator.
//! \~russian Оператор присваивания. //! \~russian Оператор присваивания.
inline PIDeque<T> & operator =(const PIDeque<T> & other) { inline PIDeque<T> & operator =(const PIDeque<T> & other) {
@@ -216,7 +208,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Assign move operator. //! \~english Assign move operator.
//! \~russian Оператор перемещающего присваивания. //! \~russian Оператор перемещающего присваивания.
inline PIDeque<T> & operator =(PIDeque<T> && other) { inline PIDeque<T> & operator =(PIDeque<T> && other) {
@@ -248,8 +239,8 @@ public:
++pos; ++pos;
return *this; return *this;
} }
inline iterator & operator ++(int) { inline iterator operator ++(int) {
const auto tmp = *this; auto tmp = *this;
++*this; ++*this;
return tmp; return tmp;
} }
@@ -257,8 +248,8 @@ public:
--pos; --pos;
return *this; return *this;
} }
inline iterator & operator --(int) { inline iterator operator --(int) {
const auto tmp = *this; auto tmp = *this;
--*this; --*this;
return tmp; return tmp;
} }
@@ -335,8 +326,8 @@ public:
++pos; ++pos;
return *this; return *this;
} }
inline const_iterator & operator ++(int) { inline const_iterator operator ++(int) {
const auto tmp = *this; auto tmp = *this;
++*this; ++*this;
return tmp; return tmp;
} }
@@ -344,8 +335,8 @@ public:
--pos; --pos;
return *this; return *this;
} }
inline const_iterator & operator --(int) { inline const_iterator operator --(int) {
const auto tmp = *this; auto tmp = *this;
--*this; --*this;
return tmp; return tmp;
} }
@@ -424,8 +415,8 @@ public:
--pos; --pos;
return *this; return *this;
} }
inline reverse_iterator & operator ++(int) { inline reverse_iterator operator ++(int) {
const auto tmp = *this; auto tmp = *this;
--*this; --*this;
return tmp; return tmp;
} }
@@ -433,8 +424,8 @@ public:
++pos; ++pos;
return *this; return *this;
} }
inline reverse_iterator & operator --(int) { inline reverse_iterator operator --(int) {
const auto tmp = *this; auto tmp = *this;
++*this; ++*this;
return tmp; return tmp;
} }
@@ -510,8 +501,8 @@ public:
--pos; --pos;
return *this; return *this;
} }
inline const_reverse_iterator & operator ++(int) { inline const_reverse_iterator operator ++(int) {
const auto tmp = *this; auto tmp = *this;
--*this; --*this;
return tmp; return tmp;
} }
@@ -519,8 +510,8 @@ public:
++pos; ++pos;
return *this; return *this;
} }
inline const_reverse_iterator & operator --(int) { inline const_reverse_iterator operator --(int) {
const auto tmp = *this; auto tmp = *this;
++*this; ++*this;
return tmp; return tmp;
} }
@@ -576,7 +567,6 @@ public:
}; };
//! \~\brief
//! \~english Iterator to the first element. //! \~english Iterator to the first element.
//! \~russian Итератор на первый элемент. //! \~russian Итератор на первый элемент.
//! \~\details ![begin, end](doc/images/pivector_begin.png) //! \~\details ![begin, end](doc/images/pivector_begin.png)
@@ -587,7 +577,6 @@ public:
//! \~\sa \a end(), \a rbegin(), \a rend() //! \~\sa \a end(), \a rbegin(), \a rend()
inline iterator begin() {return iterator(this, 0);} inline iterator begin() {return iterator(this, 0);}
//! \~\brief
//! \~english Iterator to the element following the last element. //! \~english Iterator to the element following the last element.
//! \~russian Итератор на элемент, следующий за последним элементом. //! \~russian Итератор на элемент, следующий за последним элементом.
//! \~\details ![begin, end](doc/images/pivector_begin.png) //! \~\details ![begin, end](doc/images/pivector_begin.png)
@@ -603,7 +592,6 @@ public:
inline const_iterator begin() const {return const_iterator(this, 0); } inline const_iterator begin() const {return const_iterator(this, 0); }
inline const_iterator end() const {return const_iterator(this, pid_size);} inline const_iterator end() const {return const_iterator(this, pid_size);}
//! \~\brief
//! \~english Returns a reverse iterator to the first element of the reversed array. //! \~english Returns a reverse iterator to the first element of the reversed array.
//! \~russian Обратный итератор на первый элемент. //! \~russian Обратный итератор на первый элемент.
//! \~\details ![rbegin, rend](doc/images/pivector_rbegin.png) //! \~\details ![rbegin, rend](doc/images/pivector_rbegin.png)
@@ -617,7 +605,6 @@ public:
//! \~\sa \a rend(), \a begin(), \a end() //! \~\sa \a rend(), \a begin(), \a end()
inline reverse_iterator rbegin() {return reverse_iterator(this, pid_size - 1);} inline reverse_iterator rbegin() {return reverse_iterator(this, pid_size - 1);}
//! \~\brief
//! \~english Returns a reverse iterator to the element //! \~english Returns a reverse iterator to the element
//! following the last element of the reversed array. //! following the last element of the reversed array.
//! \~russian Обратный итератор на элемент, следующий за последним элементом. //! \~russian Обратный итератор на элемент, следующий за последним элементом.
@@ -636,25 +623,21 @@ public:
inline const_reverse_iterator rbegin() const {return const_reverse_iterator(this, pid_size - 1);} inline const_reverse_iterator rbegin() const {return const_reverse_iterator(this, pid_size - 1);}
inline const_reverse_iterator rend() const {return const_reverse_iterator(this, -1);} inline const_reverse_iterator rend() const {return const_reverse_iterator(this, -1);}
//! \~\brief
//! \~english Number of elements in the container. //! \~english Number of elements in the container.
//! \~russian Количество элементов массива. //! \~russian Количество элементов массива.
//! \~\sa \a size_s(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size_s(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline size_t size() const {return pid_size;} inline size_t size() const {return pid_size;}
//! \~\brief
//! \~english Number of elements in the container as signed value. //! \~english Number of elements in the container as signed value.
//! \~russian Количество элементов массива в виде знакового числа. //! \~russian Количество элементов массива в виде знакового числа.
//! \~\sa \a size(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline ssize_t size_s() const {return pid_size;} inline ssize_t size_s() const {return pid_size;}
//! \~\brief
//! \~english Same as \a size(). //! \~english Same as \a size().
//! \~russian Синоним \a size(). //! \~russian Синоним \a size().
//! \~\sa \a size(), \a size_s(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size(), \a size_s(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline size_t length() const {return pid_size;} inline size_t length() const {return pid_size;}
//! \~\brief
//! \~english Number of elements that the container has currently allocated space for. //! \~english Number of elements that the container has currently allocated space for.
//! \~russian Количество элементов, для которого сейчас выделена память контейнером. //! \~russian Количество элементов, для которого сейчас выделена память контейнером.
//! \~\details //! \~\details
@@ -665,7 +648,6 @@ public:
inline size_t _start() const {return pid_start;} inline size_t _start() const {return pid_start;}
//! \~\brief
//! \~english Checks if the container has no elements. //! \~english Checks if the container has no elements.
//! \~russian Проверяет пуст ли контейнер. //! \~russian Проверяет пуст ли контейнер.
//! \~\return //! \~\return
@@ -674,7 +656,6 @@ public:
//! \~\sa \a size(), \a size_s(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size(), \a size_s(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline bool isEmpty() const {return (pid_size == 0);} inline bool isEmpty() const {return (pid_size == 0);}
//! \~\brief
//! \~english Checks if the container has elements. //! \~english Checks if the container has elements.
//! \~russian Проверяет не пуст ли контейнер. //! \~russian Проверяет не пуст ли контейнер.
//! \~\return //! \~\return
@@ -683,7 +664,6 @@ public:
//! \~\sa \a size(), \a size_s(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size(), \a size_s(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline bool isNotEmpty() const {return (pid_size > 0);} inline bool isNotEmpty() const {return (pid_size > 0);}
//! \~\brief
//! \~english Tests whether at least one element in the array //! \~english Tests whether at least one element in the array
//! passes the test implemented by the provided function `test`. //! passes the test implemented by the provided function `test`.
//! \~russian Проверяет, удовлетворяет ли какой-либо элемент массива условию, //! \~russian Проверяет, удовлетворяет ли какой-либо элемент массива условию,
@@ -709,7 +689,6 @@ public:
return false; return false;
} }
//! \~\brief
//! \~english Tests whether all elements in the array passes the test //! \~english Tests whether all elements in the array passes the test
//! implemented by the provided function `test`. //! implemented by the provided function `test`.
//! \~russian Проверяет, удовлетворяют ли все элементы массива условию, //! \~russian Проверяет, удовлетворяют ли все элементы массива условию,
@@ -735,7 +714,6 @@ public:
return true; return true;
} }
//! \brief
//! \~english Full access to element by `index`. //! \~english Full access to element by `index`.
//! \~russian Полный доступ к элементу по индексу `index`. //! \~russian Полный доступ к элементу по индексу `index`.
//! \~\details //! \~\details
@@ -755,7 +733,6 @@ public:
inline T & operator [](size_t index) {return pid_data[pid_start + index];} inline T & operator [](size_t index) {return pid_data[pid_start + index];}
inline const T & operator [](size_t index) const {return pid_data[pid_start + index];} inline const T & operator [](size_t index) const {return pid_data[pid_start + index];}
//! \brief
//! \~english Read only access to element by `index`. //! \~english Read only access to element by `index`.
//! \~russian Доступ исключительно на чтение к элементу по индексу `index`. //! \~russian Доступ исключительно на чтение к элементу по индексу `index`.
//! \~\details //! \~\details
@@ -767,7 +744,6 @@ public:
//! Иначе это приведёт к неопределённому поведению программы и ошибкам памяти. //! Иначе это приведёт к неопределённому поведению программы и ошибкам памяти.
inline const T & at(size_t index) const {return pid_data[pid_start + index];} inline const T & at(size_t index) const {return pid_data[pid_start + index];}
//! \brief
//! \~english Last element. //! \~english Last element.
//! \~russian Последний элемент массива. //! \~russian Последний элемент массива.
//! \~\details //! \~\details
@@ -780,7 +756,6 @@ public:
inline T & back() {return pid_data[pid_start + pid_size - 1];} inline T & back() {return pid_data[pid_start + pid_size - 1];}
inline const T & back() const {return pid_data[pid_start + pid_size - 1];} inline const T & back() const {return pid_data[pid_start + pid_size - 1];}
//! \brief
//! \~english Last element. //! \~english Last element.
//! \~russian Первый элемент массива. //! \~russian Первый элемент массива.
//! \~\details //! \~\details
@@ -793,7 +768,6 @@ public:
inline T & front() {return pid_data[pid_start];} inline T & front() {return pid_data[pid_start];}
inline const T & front() const {return pid_data[pid_start];} inline const T & front() const {return pid_data[pid_start];}
//! \brief
//! \~english Compare operator with array `v`. //! \~english Compare operator with array `v`.
//! \~russian Оператор сравнения с массивом `v`. //! \~russian Оператор сравнения с массивом `v`.
inline bool operator ==(const PIDeque<T> & v) const { inline bool operator ==(const PIDeque<T> & v) const {
@@ -804,12 +778,10 @@ public:
return true; return true;
} }
//! \brief
//! \~english Compare operator with array `v`. //! \~english Compare operator with array `v`.
//! \~russian Оператор сравнения с массивом `v`. //! \~russian Оператор сравнения с массивом `v`.
inline bool operator !=(const PIDeque<T> & v) const {return !(*this == v);} inline bool operator !=(const PIDeque<T> & v) const {return !(*this == v);}
//! \~\brief
//! \~english Tests if element `e` exists in the array. //! \~english Tests if element `e` exists in the array.
//! \~russian Проверяет наличие элемента `e` в массиве. //! \~russian Проверяет наличие элемента `e` в массиве.
//! \~\details //! \~\details
@@ -853,7 +825,6 @@ public:
return false; return false;
} }
//! \~\brief
//! \~english Count elements equal `e` in the array. //! \~english Count elements equal `e` in the array.
//! \~russian Подсчитывает количество элементов, совпадающих с элементом `e` в массиве. //! \~russian Подсчитывает количество элементов, совпадающих с элементом `e` в массиве.
//! \~\details //! \~\details
@@ -891,7 +862,6 @@ public:
return ec; return ec;
} }
//! \~\brief
//! \~english Count elements in the array passes the test implemented by the provided function `test`. //! \~english Count elements in the array passes the test implemented by the provided function `test`.
//! \~russian Подсчитывает количество элементов в массиве, //! \~russian Подсчитывает количество элементов в массиве,
//! проходящих по условию, заданному в передаваемой функции `test`. //! проходящих по условию, заданному в передаваемой функции `test`.
@@ -926,7 +896,6 @@ public:
return ec; return ec;
} }
//! \~\brief
//! \~english Returns the first index at which a given element `e` //! \~english Returns the first index at which a given element `e`
//! can be found in the array, or `-1` if it is not present. //! can be found in the array, or `-1` if it is not present.
//! \~russian Возвращает первый индекс, по которому данный элемент `e` //! \~russian Возвращает первый индекс, по которому данный элемент `e`
@@ -969,7 +938,6 @@ public:
return -1; return -1;
} }
//! \~\brief
//! \~english Returns the first index passes the test implemented by the provided function `test`, //! \~english Returns the first index passes the test implemented by the provided function `test`,
//! or `-1` if it is not present. //! or `-1` if it is not present.
//! can be found in the array, or `-1` if it is not present. //! can be found in the array, or `-1` if it is not present.
@@ -1011,7 +979,6 @@ public:
return -1; return -1;
} }
//! \~\brief
//! \~english Returns the last index at which a given element `e` //! \~english Returns the last index at which a given element `e`
//! can be found in the array, or `-1` if it is not present. //! can be found in the array, or `-1` if it is not present.
//! \~russian Возвращает последний индекс, по которому данный элемент `e` //! \~russian Возвращает последний индекс, по которому данный элемент `e`
@@ -1057,7 +1024,6 @@ public:
return -1; return -1;
} }
//! \~\brief
//! \~english Returns the last index passes the test implemented by the provided function `test`, //! \~english Returns the last index passes the test implemented by the provided function `test`,
//! or `-1` if it is not present. //! or `-1` if it is not present.
//! \~russian Возвращает последний индекс элемента проходящего по условию, //! \~russian Возвращает последний индекс элемента проходящего по условию,
@@ -1094,7 +1060,6 @@ public:
return -1; return -1;
} }
//! \~\brief
//! \~english Pointer to array //! \~english Pointer to array
//! \~russian Указатель на память массива //! \~russian Указатель на память массива
//! \~\details //! \~\details
@@ -1110,7 +1075,6 @@ public:
//! \endcode //! \endcode
inline T * data(size_t index = 0) {return &(pid_data[pid_start + index]);} inline T * data(size_t index = 0) {return &(pid_data[pid_start + index]);}
//! \~\brief
//! \~english Read only pointer to array //! \~english Read only pointer to array
//! \~russian Указатель на память массива только для чтения. //! \~russian Указатель на память массива только для чтения.
//! \~\details //! \~\details
@@ -1130,7 +1094,6 @@ public:
//! \endcode //! \endcode
inline const T * data(size_t index = 0) const {return &(pid_data[pid_start + index]);} inline const T * data(size_t index = 0) const {return &(pid_data[pid_start + index]);}
//! \~\brief
//! \~english Creates sub-array of this array. //! \~english Creates sub-array of this array.
//! \~russian Создает подмассив, то есть кусок из текущего массива. //! \~russian Создает подмассив, то есть кусок из текущего массива.
//! \~english //! \~english
@@ -1153,7 +1116,6 @@ public:
return PIDeque(&(pid_data[pid_start + index]), count); return PIDeque(&(pid_data[pid_start + index]), count);
} }
//! \~\brief
//! \~english Clear array, remove all elements. //! \~english Clear array, remove all elements.
//! \~russian Очищает массив, удаляет все элементы. //! \~russian Очищает массив, удаляет все элементы.
//! \~\details //! \~\details
@@ -1178,7 +1140,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Assigns element 'e' to all items in the array. //! \~english Assigns element 'e' to all items in the array.
//! \~russian Заполняет весь массив копиями элемента 'e'. //! \~russian Заполняет весь массив копиями элемента 'e'.
//! \~\details //! \~\details
@@ -1197,7 +1158,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Assigns result of function 'f(size_t i)' to all items in the array. //! \~english Assigns result of function 'f(size_t i)' to all items in the array.
//! \~russian Заполняет весь массив результатом вызова функции 'f(size_t i)'. //! \~russian Заполняет весь массив результатом вызова функции 'f(size_t i)'.
//! \~\details //! \~\details
@@ -1216,13 +1176,11 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Same as \a fill(). //! \~english Same as \a fill().
//! \~russian Тоже самое что и \a fill(). //! \~russian Тоже самое что и \a fill().
//! \~\sa \a fill(), \a resize() //! \~\sa \a fill(), \a resize()
inline PIDeque<T> & assign(const T & e = T()) {return fill(e);} inline PIDeque<T> & assign(const T & e = T()) {return fill(e);}
//! \~\brief
//! \~english First does `resize(new_size)` then `fill(e)`. //! \~english First does `resize(new_size)` then `fill(e)`.
//! \~russian Сначала делает `resize(new_size)`, затем `fill(e)`. //! \~russian Сначала делает `resize(new_size)`, затем `fill(e)`.
//! \~\sa \a fill(), \a resize() //! \~\sa \a fill(), \a resize()
@@ -1241,7 +1199,6 @@ public:
return fill(e); return fill(e);
} }
//! \~\brief
//! \~english Sets size of the array, new elements are copied from `e`. //! \~english Sets size of the array, new elements are copied from `e`.
//! \~russian Устанавливает размер массива, новые элементы копируются из `e`. //! \~russian Устанавливает размер массива, новые элементы копируются из `e`.
//! \~\details //! \~\details
@@ -1272,7 +1229,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Sets size of the array, new elements created by function `f(size_t i)`. //! \~english Sets size of the array, new elements created by function `f(size_t i)`.
//! \~russian Устанавливает размер массива, новые элементы создаются функцией `f(size_t i)`. //! \~russian Устанавливает размер массива, новые элементы создаются функцией `f(size_t i)`.
//! \~\details //! \~\details
@@ -1321,7 +1277,6 @@ public:
newT(dst, src, size); newT(dst, src, size);
} }
//! \~\brief
//! \~english Attempts to allocate memory for at least `new_size` elements. //! \~english Attempts to allocate memory for at least `new_size` elements.
//! \~russian Резервируется память под как минимум `new_size` элементов. //! \~russian Резервируется память под как минимум `new_size` элементов.
//! \~\details //! \~\details
@@ -1344,7 +1299,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Inserts value `e` at `index` position in the array. //! \~english Inserts value `e` at `index` position in the array.
//! \~russian Вставляет значение `e` в позицию `index` в массиве. //! \~russian Вставляет значение `e` в позицию `index` в массиве.
//! \~\details //! \~\details
@@ -1376,7 +1330,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Inserts value `e` at `index` position in the array. //! \~english Inserts value `e` at `index` position in the array.
//! \~russian Вставляет значение `e` в позицию `index` в массиве. //! \~russian Вставляет значение `e` в позицию `index` в массиве.
//! \~\details //! \~\details
@@ -1403,7 +1356,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Inserts array `v` at `index` position in the array. //! \~english Inserts array `v` at `index` position in the array.
//! \~russian Вставляет массив `v` в позицию `index` в массиве. //! \~russian Вставляет массив `v` в позицию `index` в массиве.
//! \~\details //! \~\details
@@ -1435,7 +1387,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Inserts the given elements at `index` position in the array. //! \~english Inserts the given elements at `index` position in the array.
//! \~russian Вставляет элементы в позицию `index` в массиве. //! \~russian Вставляет элементы в позицию `index` в массиве.
//! \~\details //! \~\details
@@ -1464,7 +1415,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Removes `count` elements from the middle of the array, starting at `index` position. //! \~english Removes `count` elements from the middle of the array, starting at `index` position.
//! \~russian Удаляет элементы из массива, начиная с позиции `index` в количестве `count`. //! \~russian Удаляет элементы из массива, начиная с позиции `index` в количестве `count`.
//! \~\details //! \~\details
@@ -1496,7 +1446,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Swaps array `v` other with this array. //! \~english Swaps array `v` other with this array.
//! \~russian Меняет местами массив `v` с этим массивом. //! \~russian Меняет местами массив `v` с этим массивом.
//! \~\details //! \~\details
@@ -1509,7 +1458,6 @@ public:
piSwap<ssize_t>(pid_start, other.pid_start); piSwap<ssize_t>(pid_start, other.pid_start);
} }
//! \~\brief
//! \~english Sorts the elements in non-descending order. //! \~english Sorts the elements in non-descending order.
//! \~russian Сортировка элементов в порядке возрастания. //! \~russian Сортировка элементов в порядке возрастания.
//! \~\details //! \~\details
@@ -1532,7 +1480,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Sorts the elements in non-descending order. //! \~english Sorts the elements in non-descending order.
//! \~russian Сортировка элементов в порядке возрастания. //! \~russian Сортировка элементов в порядке возрастания.
//! \~\details //! \~\details
@@ -1572,7 +1519,6 @@ public:
} }
//! \~\brief
//! \~english Reverses this array. //! \~english Reverses this array.
//! \~russian Обращает порядок следования элементов этого массива. //! \~russian Обращает порядок следования элементов этого массива.
//! \~\details //! \~\details
@@ -1597,7 +1543,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Returns reversed array. //! \~english Returns reversed array.
//! \~russian Возвращает перевернутый массив. //! \~russian Возвращает перевернутый массив.
//! \~\details //! \~\details
@@ -1611,7 +1556,6 @@ public:
return ret.reverse(); return ret.reverse();
} }
//! \~\brief
//! \~english Increases or decreases the size of the array by `add_size` elements. //! \~english Increases or decreases the size of the array by `add_size` elements.
//! \~russian Увеличивает или уменьшает размер массива на `add_size` элементов. //! \~russian Увеличивает или уменьшает размер массива на `add_size` элементов.
//! \~\details //! \~\details
@@ -1629,7 +1573,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove no more than one element equal `e`. //! \~english Remove no more than one element equal `e`.
//! \~russian Удаляет первый элемент, который равен элементу `e`. //! \~russian Удаляет первый элемент, который равен элементу `e`.
//! \~\details //! \~\details
@@ -1649,7 +1592,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove all elements equal `e`. //! \~english Remove all elements equal `e`.
//! \~russian Удаляет все элементы, равные элементу `e`. //! \~russian Удаляет все элементы, равные элементу `e`.
//! \~\details //! \~\details
@@ -1669,7 +1611,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove all elements in the array //! \~english Remove all elements in the array
//! passes the test implemented by the provided function `test`. //! passes the test implemented by the provided function `test`.
//! \~russian Удаляет все элементы, удовлетворяющие условию, //! \~russian Удаляет все элементы, удовлетворяющие условию,
@@ -1691,7 +1632,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1723,7 +1663,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1737,7 +1676,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given elements to the end of the array. //! \~english Appends the given elements to the end of the array.
//! \~russian Добавляет элементы в конец массива. //! \~russian Добавляет элементы в конец массива.
//! \~\details //! \~\details
@@ -1755,7 +1693,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given array `v` to the end of the array. //! \~english Appends the given array `v` to the end of the array.
//! \~russian Добавляет массив `v` в конец массива. //! \~russian Добавляет массив `v` в конец массива.
//! \~\details //! \~\details
@@ -1775,7 +1712,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1802,7 +1738,6 @@ public:
//! \~\sa \a prepend(), \a push_front(), \a push_back(), \a insert() //! \~\sa \a prepend(), \a push_front(), \a push_back(), \a insert()
inline PIDeque<T> & append(const T & e) {return push_back(e);} inline PIDeque<T> & append(const T & e) {return push_back(e);}
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1811,7 +1746,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIDeque<T> & append(T && e) {return push_back(std::move(e));} inline PIDeque<T> & append(T && e) {return push_back(std::move(e));}
//! \brief
//! \~english Appends the given elements to the end of the array. //! \~english Appends the given elements to the end of the array.
//! \~russian Добавляет элементы в конец массива. //! \~russian Добавляет элементы в конец массива.
//! \~\details //! \~\details
@@ -1824,7 +1758,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIDeque<T> & append(std::initializer_list<T> init_list) {return push_back(init_list);} inline PIDeque<T> & append(std::initializer_list<T> init_list) {return push_back(init_list);}
//! \brief
//! \~english Appends the given array `v` to the end of the array. //! \~english Appends the given array `v` to the end of the array.
//! \~russian Добавляет массив `v` в конец массива. //! \~russian Добавляет массив `v` в конец массива.
//! \~\details //! \~\details
@@ -1838,7 +1771,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIDeque<T> & append(const PIDeque<T> & v) {return push_back(v);} inline PIDeque<T> & append(const PIDeque<T> & v) {return push_back(v);}
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1850,7 +1782,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIDeque<T> & operator <<(const T & e) {return push_back(e);} inline PIDeque<T> & operator <<(const T & e) {return push_back(e);}
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1862,7 +1793,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIDeque<T> & operator <<(T && e) {return push_back(std::move(e));} inline PIDeque<T> & operator <<(T && e) {return push_back(std::move(e));}
//! \brief
//! \~english Appends the given array `v` to the end of the array. //! \~english Appends the given array `v` to the end of the array.
//! \~russian Добавляет массив `v` в конец массива. //! \~russian Добавляет массив `v` в конец массива.
//! \~\details //! \~\details
@@ -1874,7 +1804,6 @@ public:
//! \~\sa \a append(), \a push_back() //! \~\sa \a append(), \a push_back()
inline PIDeque<T> & operator <<(const PIDeque<T> & v) {return append(v);} inline PIDeque<T> & operator <<(const PIDeque<T> & v) {return append(v);}
//! \brief
//! \~english Appends the given element `e` to the begin of the array. //! \~english Appends the given element `e` to the begin of the array.
//! \~russian Добавляет элемент `e` в начало массива. //! \~russian Добавляет элемент `e` в начало массива.
//! \~\details //! \~\details
@@ -1904,7 +1833,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the begin of the array. //! \~english Appends the given element `e` to the begin of the array.
//! \~russian Добавляет элемент `e` в начало массива. //! \~russian Добавляет элемент `e` в начало массива.
//! \~\details //! \~\details
@@ -1916,7 +1844,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given array `v` to the begin of the array. //! \~english Appends the given array `v` to the begin of the array.
//! \~russian Добавляет массив `v` в начало массива. //! \~russian Добавляет массив `v` в начало массива.
//! \~\details //! \~\details
@@ -1933,7 +1860,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given elements to the begin of the array. //! \~english Appends the given elements to the begin of the array.
//! \~russian Добавляет элементы в начало массива. //! \~russian Добавляет элементы в начало массива.
//! \~\details //! \~\details
@@ -1949,7 +1875,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the begin of the array. //! \~english Appends the given element `e` to the begin of the array.
//! \~russian Добавляет элемент `e` в начало массива. //! \~russian Добавляет элемент `e` в начало массива.
//! \~\details //! \~\details
@@ -1976,7 +1901,6 @@ public:
//! \~\sa \a push_back(), \a append(), \a prepend(), \a insert() //! \~\sa \a push_back(), \a append(), \a prepend(), \a insert()
inline PIDeque<T> & prepend(const T & e) {return push_front(e);} inline PIDeque<T> & prepend(const T & e) {return push_front(e);}
//! \brief
//! \~english Appends the given element `e` to the begin of the array. //! \~english Appends the given element `e` to the begin of the array.
//! \~russian Добавляет элемент `e` в начало массива. //! \~russian Добавляет элемент `e` в начало массива.
//! \~\details //! \~\details
@@ -1985,7 +1909,6 @@ public:
//! \~\sa \a prepend() //! \~\sa \a prepend()
inline PIDeque<T> & prepend(T && e) {return push_front(std::move(e));} inline PIDeque<T> & prepend(T && e) {return push_front(std::move(e));}
//! \brief
//! \~english Appends the given array `v` to the begin of the array. //! \~english Appends the given array `v` to the begin of the array.
//! \~russian Добавляет массив `v` в начало массива. //! \~russian Добавляет массив `v` в начало массива.
//! \~\details //! \~\details
@@ -1999,7 +1922,6 @@ public:
//! \~\sa \a prepend() //! \~\sa \a prepend()
inline PIDeque<T> & prepend(const PIDeque<T> & v) {return push_front(v);} inline PIDeque<T> & prepend(const PIDeque<T> & v) {return push_front(v);}
//! \brief
//! \~english Appends the given elements to the begin of the array. //! \~english Appends the given elements to the begin of the array.
//! \~russian Добавляет элементы в начало массива. //! \~russian Добавляет элементы в начало массива.
//! \~\details //! \~\details
@@ -2012,7 +1934,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIDeque<T> & prepend(std::initializer_list<T> init_list) {return prepend(init_list);} inline PIDeque<T> & prepend(std::initializer_list<T> init_list) {return prepend(init_list);}
//! \brief
//! \~english Remove one element from the end of the array. //! \~english Remove one element from the end of the array.
//! \~russian Удаляет один элемент с конца массива. //! \~russian Удаляет один элемент с конца массива.
//! \~\details //! \~\details
@@ -2032,7 +1953,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove one element from the begining of the array. //! \~english Remove one element from the begining of the array.
//! \~russian Удаляет один элемент с начала массива. //! \~russian Удаляет один элемент с начала массива.
//! \~\details //! \~\details
@@ -2054,7 +1974,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove one element from the end of the array and return it. //! \~english Remove one element from the end of the array and return it.
//! \~russian Удаляет один элемент с начала массива и возвращает его. //! \~russian Удаляет один элемент с начала массива и возвращает его.
//! \~\details //! \~\details
@@ -2070,7 +1989,6 @@ public:
return e; return e;
} }
//! \brief
//! \~english Remove one element from the begining of the array and return it. //! \~english Remove one element from the begining of the array and return it.
//! \~russian Удаляет один элемент с конца массива и возвращает его. //! \~russian Удаляет один элемент с конца массива и возвращает его.
//! \~\details //! \~\details
@@ -2086,7 +2004,6 @@ public:
return e; return e;
} }
//! \brief
//! \~english Returns an array converted to another type. //! \~english Returns an array converted to another type.
//! \~russian Возвращает конвертированный в другой тип массив. //! \~russian Возвращает конвертированный в другой тип массив.
//! \~\details //! \~\details
@@ -2105,7 +2022,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Returns a new array with all elements //! \~english Returns a new array with all elements
//! that pass the test implemented by the provided function `test`. //! that pass the test implemented by the provided function `test`.
//! \~russian Возвращает новый массив со всеми элементами, //! \~russian Возвращает новый массив со всеми элементами,
@@ -2125,7 +2041,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Execute function `void f(const T & e)` for every element in array. //! \~english Execute function `void f(const T & e)` for every element in array.
//! \~russian Выполняет функцию `void f(const T & e)` для каждого элемента массива. //! \~russian Выполняет функцию `void f(const T & e)` для каждого элемента массива.
//! \~\details //! \~\details
@@ -2146,7 +2061,6 @@ public:
} }
} }
//! \brief
//! \~english Execute function `void f(T & e)` for every element in array. //! \~english Execute function `void f(T & e)` for every element in array.
//! \~russian Выполняет функцию `void f(T & e)` для каждого элемента массива. //! \~russian Выполняет функцию `void f(T & e)` для каждого элемента массива.
//! \~\details //! \~\details
@@ -2167,7 +2081,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Сreates a new array populated with the results //! \~english Сreates a new array populated with the results
//! of calling a provided function `ST f(const T & e)` on every element in the calling array. //! of calling a provided function `ST f(const T & e)` on every element in the calling array.
//! \~russian Создаёт новый массив с результатом вызова указанной функции //! \~russian Создаёт новый массив с результатом вызова указанной функции
@@ -2194,7 +2107,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Applies the function `ST f(const T & e, const ST & acc)` //! \~english Applies the function `ST f(const T & e, const ST & acc)`
//! to each element of the array (from left to right), returns one value. //! to each element of the array (from left to right), returns one value.
//! \~russian Применяет функцию `ST f(const T & e, const ST & acc)` //! \~russian Применяет функцию `ST f(const T & e, const ST & acc)`
@@ -2245,7 +2157,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Changes the dimension of the array, creates a two-dimensional array from a one-dimensional array. //! \~english Changes the dimension of the array, creates a two-dimensional array from a one-dimensional array.
//! \~russian Изменяет размерность массива, из одномерного массива создает двухмерный. //! \~russian Изменяет размерность массива, из одномерного массива создает двухмерный.
//! \~\details //! \~\details
@@ -2291,7 +2202,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Changes the dimension of the array, creates a one-dimensional array from a two-dimensional array. //! \~english Changes the dimension of the array, creates a one-dimensional array from a two-dimensional array.
//! \~russian Изменяет размерность массива, из двухмерный массива создает одномерный. //! \~russian Изменяет размерность массива, из двухмерный массива создает одномерный.
//! \~\details //! \~\details
@@ -2331,7 +2241,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Changes the dimension of the two-dimensional array. //! \~english Changes the dimension of the two-dimensional array.
//! \~russian Изменяет размерность двухмерного массива. //! \~russian Изменяет размерность двухмерного массива.
//! \~\details //! \~\details

View File

@@ -119,14 +119,12 @@ class PIVector {
public: public:
typedef bool (*CompareFunc)(const T & , const T & ); typedef bool (*CompareFunc)(const T & , const T & );
//! \~\brief
//! \~english Constructs an empty array. //! \~english Constructs an empty array.
//! \~russian Создает пустой массив. //! \~russian Создает пустой массив.
inline PIVector(): piv_data(0), piv_size(0), piv_rsize(0) { inline PIVector(): piv_data(0), piv_size(0), piv_rsize(0) {
PIINTROSPECTION_CONTAINER_NEW(T, sizeof(T)) PIINTROSPECTION_CONTAINER_NEW(T, sizeof(T))
} }
//! \~\brief
//! \~english Contructs array from raw `data`. //! \~english Contructs array from raw `data`.
//! This constructor reserve `size` and copy from `data` pointer. //! This constructor reserve `size` and copy from `data` pointer.
//! \~russian Создает массив из указателя на данные `data` и размер `size`. //! \~russian Создает массив из указателя на данные `data` и размер `size`.
@@ -137,7 +135,6 @@ public:
newT(piv_data, data, piv_size); newT(piv_data, data, piv_size);
} }
//! \~\brief
//! \~english Copy constructor. //! \~english Copy constructor.
//! \~russian Копирующий конструктор. //! \~russian Копирующий конструктор.
inline PIVector(const PIVector<T> & v): piv_data(0), piv_size(0), piv_rsize(0) { inline PIVector(const PIVector<T> & v): piv_data(0), piv_size(0), piv_rsize(0) {
@@ -146,7 +143,6 @@ public:
newT(piv_data, v.piv_data, piv_size); newT(piv_data, v.piv_data, piv_size);
} }
//! \~\brief
//! \~english Contructs array from //! \~english Contructs array from
//! [C++11 initializer list](https://en.cppreference.com/w/cpp/utility/initializer_list). //! [C++11 initializer list](https://en.cppreference.com/w/cpp/utility/initializer_list).
//! \~russian Создает массив из //! \~russian Создает массив из
@@ -162,7 +158,6 @@ public:
newT(piv_data, init_list.begin(), init_list.size()); newT(piv_data, init_list.begin(), init_list.size());
} }
//! \~\brief
//! \~english Contructs array with size `size` filled elements `e`. //! \~english Contructs array with size `size` filled elements `e`.
//! \~russian Создает массив из `size` элементов заполненных `e`. //! \~russian Создает массив из `size` элементов заполненных `e`.
inline PIVector(size_t size, const T & e = T()): piv_data(0), piv_size(0), piv_rsize(0) { inline PIVector(size_t size, const T & e = T()): piv_data(0), piv_size(0), piv_rsize(0) {
@@ -170,7 +165,6 @@ public:
resize(size, e); resize(size, e);
} }
//! \~\brief
//! \~english Contructs array with size `size` and elements created by function `f(size_t i)`. //! \~english Contructs array with size `size` and elements created by function `f(size_t i)`.
//! \~russian Создает массив из `size` элементов созданных функцией `f(size_t i)`. //! \~russian Создает массив из `size` элементов созданных функцией `f(size_t i)`.
//! \~\details //! \~\details
@@ -189,7 +183,6 @@ public:
resize(size, f); resize(size, f);
} }
//! \~\brief
//! \~english Move constructor. //! \~english Move constructor.
//! \~russian Перемещающий конструктор. //! \~russian Перемещающий конструктор.
inline PIVector(PIVector<T> && v): piv_data(v.piv_data), piv_size(v.piv_size), piv_rsize(v.piv_rsize) { inline PIVector(PIVector<T> && v): piv_data(v.piv_data), piv_size(v.piv_size), piv_rsize(v.piv_rsize) {
@@ -205,7 +198,6 @@ public:
_reset(); _reset();
} }
//! \~\brief
//! \~english Assign operator. //! \~english Assign operator.
//! \~russian Оператор присваивания. //! \~russian Оператор присваивания.
inline PIVector<T> & operator =(const PIVector<T> & v) { inline PIVector<T> & operator =(const PIVector<T> & v) {
@@ -217,7 +209,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Assign move operator. //! \~english Assign move operator.
//! \~russian Оператор перемещающего присваивания. //! \~russian Оператор перемещающего присваивания.
inline PIVector<T> & operator =(PIVector<T> && v) { inline PIVector<T> & operator =(PIVector<T> && v) {
@@ -249,8 +240,8 @@ public:
++pos; ++pos;
return *this; return *this;
} }
inline iterator & operator ++(int) { inline iterator operator ++(int) {
const auto tmp = *this; auto tmp = *this;
++*this; ++*this;
return tmp; return tmp;
} }
@@ -258,8 +249,8 @@ public:
--pos; --pos;
return *this; return *this;
} }
inline iterator & operator --(int) { inline iterator operator --(int) {
const auto tmp = *this; auto tmp = *this;
--*this; --*this;
return tmp; return tmp;
} }
@@ -336,8 +327,8 @@ public:
++pos; ++pos;
return *this; return *this;
} }
inline const_iterator & operator ++(int) { inline const_iterator operator ++(int) {
const auto tmp = *this; auto tmp = *this;
++*this; ++*this;
return tmp; return tmp;
} }
@@ -345,8 +336,8 @@ public:
--pos; --pos;
return *this; return *this;
} }
inline const_iterator & operator --(int) { inline const_iterator operator --(int) {
const auto tmp = *this; auto tmp = *this;
--*this; --*this;
return tmp; return tmp;
} }
@@ -425,8 +416,8 @@ public:
--pos; --pos;
return *this; return *this;
} }
inline reverse_iterator & operator ++(int) { inline reverse_iterator operator ++(int) {
const auto tmp = *this; auto tmp = *this;
--*this; --*this;
return tmp; return tmp;
} }
@@ -434,8 +425,8 @@ public:
++pos; ++pos;
return *this; return *this;
} }
inline reverse_iterator & operator --(int) { inline reverse_iterator operator --(int) {
const auto tmp = *this; auto tmp = *this;
++*this; ++*this;
return tmp; return tmp;
} }
@@ -511,8 +502,8 @@ public:
--pos; --pos;
return *this; return *this;
} }
inline const_reverse_iterator & operator ++(int) { inline const_reverse_iterator operator ++(int) {
const auto tmp = *this; auto tmp = *this;
--*this; --*this;
return tmp; return tmp;
} }
@@ -520,8 +511,8 @@ public:
++pos; ++pos;
return *this; return *this;
} }
inline const_reverse_iterator & operator --(int) { inline const_reverse_iterator operator --(int) {
const auto tmp = *this; auto tmp = *this;
++*this; ++*this;
return tmp; return tmp;
} }
@@ -576,7 +567,6 @@ public:
} }
}; };
//! \~\brief
//! \~english Iterator to the first element. //! \~english Iterator to the first element.
//! \~russian Итератор на первый элемент. //! \~russian Итератор на первый элемент.
//! \~\details ![begin, end](doc/images/pivector_begin.png) //! \~\details ![begin, end](doc/images/pivector_begin.png)
@@ -587,7 +577,6 @@ public:
//! \~\sa \a end(), \a rbegin(), \a rend() //! \~\sa \a end(), \a rbegin(), \a rend()
inline iterator begin() {return iterator(this, 0);} inline iterator begin() {return iterator(this, 0);}
//! \~\brief
//! \~english Iterator to the element following the last element. //! \~english Iterator to the element following the last element.
//! \~russian Итератор на элемент, следующий за последним элементом. //! \~russian Итератор на элемент, следующий за последним элементом.
//! \~\details ![begin, end](doc/images/pivector_begin.png) //! \~\details ![begin, end](doc/images/pivector_begin.png)
@@ -603,7 +592,6 @@ public:
inline const_iterator begin() const {return const_iterator(this, 0);} inline const_iterator begin() const {return const_iterator(this, 0);}
inline const_iterator end() const {return const_iterator(this, piv_size);} inline const_iterator end() const {return const_iterator(this, piv_size);}
//! \~\brief
//! \~english Returns a reverse iterator to the first element of the reversed array. //! \~english Returns a reverse iterator to the first element of the reversed array.
//! \~russian Обратный итератор на первый элемент. //! \~russian Обратный итератор на первый элемент.
//! \~\details ![rbegin, rend](doc/images/pivector_rbegin.png) //! \~\details ![rbegin, rend](doc/images/pivector_rbegin.png)
@@ -617,7 +605,6 @@ public:
//! \~\sa \a rend(), \a begin(), \a end() //! \~\sa \a rend(), \a begin(), \a end()
inline reverse_iterator rbegin() {return reverse_iterator(this, piv_size - 1);} inline reverse_iterator rbegin() {return reverse_iterator(this, piv_size - 1);}
//! \~\brief
//! \~english Returns a reverse iterator to the element //! \~english Returns a reverse iterator to the element
//! following the last element of the reversed array. //! following the last element of the reversed array.
//! \~russian Обратный итератор на элемент, следующий за последним элементом. //! \~russian Обратный итератор на элемент, следующий за последним элементом.
@@ -636,25 +623,21 @@ public:
inline const_reverse_iterator rbegin() const {return const_reverse_iterator(this, piv_size - 1);} inline const_reverse_iterator rbegin() const {return const_reverse_iterator(this, piv_size - 1);}
inline const_reverse_iterator rend() const {return const_reverse_iterator(this, -1);} inline const_reverse_iterator rend() const {return const_reverse_iterator(this, -1);}
//! \~\brief
//! \~english Number of elements in the container. //! \~english Number of elements in the container.
//! \~russian Количество элементов массива. //! \~russian Количество элементов массива.
//! \~\sa \a size_s(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size_s(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline size_t size() const {return piv_size;} inline size_t size() const {return piv_size;}
//! \~\brief
//! \~english Number of elements in the container as signed value. //! \~english Number of elements in the container as signed value.
//! \~russian Количество элементов массива в виде знакового числа. //! \~russian Количество элементов массива в виде знакового числа.
//! \~\sa \a size(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline ssize_t size_s() const {return piv_size;} inline ssize_t size_s() const {return piv_size;}
//! \~\brief
//! \~english Same as \a size(). //! \~english Same as \a size().
//! \~russian Синоним \a size(). //! \~russian Синоним \a size().
//! \~\sa \a size(), \a size_s(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size(), \a size_s(), \a capacity(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline size_t length() const {return piv_size;} inline size_t length() const {return piv_size;}
//! \~\brief
//! \~english Number of elements that the container has currently allocated space for. //! \~english Number of elements that the container has currently allocated space for.
//! \~russian Количество элементов, для которого сейчас выделена память контейнером. //! \~russian Количество элементов, для которого сейчас выделена память контейнером.
//! \~\details //! \~\details
@@ -663,7 +646,6 @@ public:
//! \~\sa \a reserve(), \a size(), \a size_s() //! \~\sa \a reserve(), \a size(), \a size_s()
inline size_t capacity() const {return piv_rsize;} inline size_t capacity() const {return piv_rsize;}
//! \~\brief
//! \~english Checks if the container has no elements. //! \~english Checks if the container has no elements.
//! \~russian Проверяет пуст ли контейнер. //! \~russian Проверяет пуст ли контейнер.
//! \~\return //! \~\return
@@ -672,7 +654,6 @@ public:
//! \~\sa \a size(), \a size_s(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size(), \a size_s(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline bool isEmpty() const {return (piv_size == 0);} inline bool isEmpty() const {return (piv_size == 0);}
//! \~\brief
//! \~english Checks if the container has elements. //! \~english Checks if the container has elements.
//! \~russian Проверяет не пуст ли контейнер. //! \~russian Проверяет не пуст ли контейнер.
//! \~\return //! \~\return
@@ -681,7 +662,6 @@ public:
//! \~\sa \a size(), \a size_s(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve() //! \~\sa \a size(), \a size_s(), \a isEmpty(), \a isNotEmpty(), \a resize(), \a reserve()
inline bool isNotEmpty() const {return (piv_size > 0);} inline bool isNotEmpty() const {return (piv_size > 0);}
//! \~\brief
//! \~english Tests whether at least one element in the array //! \~english Tests whether at least one element in the array
//! passes the test implemented by the provided function `test`. //! passes the test implemented by the provided function `test`.
//! \~russian Проверяет, удовлетворяет ли какой-либо элемент массива условию, //! \~russian Проверяет, удовлетворяет ли какой-либо элемент массива условию,
@@ -707,7 +687,6 @@ public:
return false; return false;
} }
//! \~\brief
//! \~english Tests whether all elements in the array passes the test //! \~english Tests whether all elements in the array passes the test
//! implemented by the provided function `test`. //! implemented by the provided function `test`.
//! \~russian Проверяет, удовлетворяют ли все элементы массива условию, //! \~russian Проверяет, удовлетворяют ли все элементы массива условию,
@@ -733,7 +712,6 @@ public:
return true; return true;
} }
//! \brief
//! \~english Full access to element by `index`. //! \~english Full access to element by `index`.
//! \~russian Полный доступ к элементу по индексу `index`. //! \~russian Полный доступ к элементу по индексу `index`.
//! \~\details //! \~\details
@@ -753,7 +731,6 @@ public:
inline T & operator [](size_t index) {return piv_data[index];} inline T & operator [](size_t index) {return piv_data[index];}
inline const T & operator [](size_t index) const {return piv_data[index];} inline const T & operator [](size_t index) const {return piv_data[index];}
//! \brief
//! \~english Read only access to element by `index`. //! \~english Read only access to element by `index`.
//! \~russian Доступ исключительно на чтение к элементу по индексу `index`. //! \~russian Доступ исключительно на чтение к элементу по индексу `index`.
//! \~\details //! \~\details
@@ -765,7 +742,6 @@ public:
//! Иначе это приведёт к неопределённому поведению программы и ошибкам памяти. //! Иначе это приведёт к неопределённому поведению программы и ошибкам памяти.
inline const T & at(size_t index) const {return piv_data[index];} inline const T & at(size_t index) const {return piv_data[index];}
//! \brief
//! \~english Last element. //! \~english Last element.
//! \~russian Последний элемент массива. //! \~russian Последний элемент массива.
//! \~\details //! \~\details
@@ -778,7 +754,6 @@ public:
inline T & back() {return piv_data[piv_size - 1];} inline T & back() {return piv_data[piv_size - 1];}
inline const T & back() const {return piv_data[piv_size - 1];} inline const T & back() const {return piv_data[piv_size - 1];}
//! \brief
//! \~english Last element. //! \~english Last element.
//! \~russian Первый элемент массива. //! \~russian Первый элемент массива.
//! \~\details //! \~\details
@@ -791,7 +766,6 @@ public:
inline T & front() {return piv_data[0];} inline T & front() {return piv_data[0];}
inline const T & front() const {return piv_data[0];} inline const T & front() const {return piv_data[0];}
//! \brief
//! \~english Compare operator with array `v`. //! \~english Compare operator with array `v`.
//! \~russian Оператор сравнения с массивом `v`. //! \~russian Оператор сравнения с массивом `v`.
inline bool operator ==(const PIVector<T> & v) const { inline bool operator ==(const PIVector<T> & v) const {
@@ -802,12 +776,10 @@ public:
return true; return true;
} }
//! \brief
//! \~english Compare operator with array `v`. //! \~english Compare operator with array `v`.
//! \~russian Оператор сравнения с массивом `v`. //! \~russian Оператор сравнения с массивом `v`.
inline bool operator !=(const PIVector<T> & v) const {return !(*this == v);} inline bool operator !=(const PIVector<T> & v) const {return !(*this == v);}
//! \~\brief
//! \~english Tests if element `e` exists in the array. //! \~english Tests if element `e` exists in the array.
//! \~russian Проверяет наличие элемента `e` в массиве. //! \~russian Проверяет наличие элемента `e` в массиве.
//! \~\details //! \~\details
@@ -851,7 +823,6 @@ public:
return false; return false;
} }
//! \~\brief
//! \~english Count elements equal `e` in the array. //! \~english Count elements equal `e` in the array.
//! \~russian Подсчитывает количество элементов, совпадающих с элементом `e` в массиве. //! \~russian Подсчитывает количество элементов, совпадающих с элементом `e` в массиве.
//! \~\details //! \~\details
@@ -889,7 +860,6 @@ public:
return ec; return ec;
} }
//! \~\brief
//! \~english Count elements in the array passes the test implemented by the provided function `test`. //! \~english Count elements in the array passes the test implemented by the provided function `test`.
//! \~russian Подсчитывает количество элементов в массиве, //! \~russian Подсчитывает количество элементов в массиве,
//! проходящих по условию, заданному в передаваемой функции `test`. //! проходящих по условию, заданному в передаваемой функции `test`.
@@ -924,7 +894,6 @@ public:
return ec; return ec;
} }
//! \~\brief
//! \~english Returns the first index at which a given element `e` //! \~english Returns the first index at which a given element `e`
//! can be found in the array, or `-1` if it is not present. //! can be found in the array, or `-1` if it is not present.
//! \~russian Возвращает первый индекс, по которому данный элемент `e` //! \~russian Возвращает первый индекс, по которому данный элемент `e`
@@ -965,7 +934,6 @@ public:
return -1; return -1;
} }
//! \~\brief
//! \~english Returns the first index passes the test implemented by the provided function `test`, //! \~english Returns the first index passes the test implemented by the provided function `test`,
//! or `-1` if it is not present. //! or `-1` if it is not present.
//! can be found in the array, or `-1` if it is not present. //! can be found in the array, or `-1` if it is not present.
@@ -1005,7 +973,6 @@ public:
return -1; return -1;
} }
//! \~\brief
//! \~english Returns the last index at which a given element `e` //! \~english Returns the last index at which a given element `e`
//! can be found in the array, or `-1` if it is not present. //! can be found in the array, or `-1` if it is not present.
//! \~russian Возвращает последний индекс, по которому данный элемент `e` //! \~russian Возвращает последний индекс, по которому данный элемент `e`
@@ -1049,7 +1016,6 @@ public:
return -1; return -1;
} }
//! \~\brief
//! \~english Returns the last index passes the test implemented by the provided function `test`, //! \~english Returns the last index passes the test implemented by the provided function `test`,
//! or `-1` if it is not present. //! or `-1` if it is not present.
//! \~russian Возвращает последний индекс элемента проходящего по условию, //! \~russian Возвращает последний индекс элемента проходящего по условию,
@@ -1084,7 +1050,6 @@ public:
return -1; return -1;
} }
//! \~\brief
//! \~english Pointer to array //! \~english Pointer to array
//! \~russian Указатель на память массива //! \~russian Указатель на память массива
//! \~\details //! \~\details
@@ -1100,7 +1065,6 @@ public:
//! \endcode //! \endcode
inline T * data(size_t index = 0) {return &(piv_data[index]);} inline T * data(size_t index = 0) {return &(piv_data[index]);}
//! \~\brief
//! \~english Read only pointer to array //! \~english Read only pointer to array
//! \~russian Указатель на память массива только для чтения. //! \~russian Указатель на память массива только для чтения.
//! \~\details //! \~\details
@@ -1120,7 +1084,6 @@ public:
//! \endcode //! \endcode
inline const T * data(size_t index = 0) const {return &(piv_data[index]);} inline const T * data(size_t index = 0) const {return &(piv_data[index]);}
//! \~\brief
//! \~english Creates sub-array of this array. //! \~english Creates sub-array of this array.
//! \~russian Создает подмассив, то есть кусок из текущего массива. //! \~russian Создает подмассив, то есть кусок из текущего массива.
//! \~english //! \~english
@@ -1143,7 +1106,6 @@ public:
return PIVector(&(piv_data[index]), count); return PIVector(&(piv_data[index]), count);
} }
//! \~\brief
//! \~english Clear array, remove all elements. //! \~english Clear array, remove all elements.
//! \~russian Очищает массив, удаляет все элементы. //! \~russian Очищает массив, удаляет все элементы.
//! \~\details //! \~\details
@@ -1167,7 +1129,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Assigns element 'e' to all items in the array. //! \~english Assigns element 'e' to all items in the array.
//! \~russian Заполняет весь массив копиями элемента 'e'. //! \~russian Заполняет весь массив копиями элемента 'e'.
//! \~\details //! \~\details
@@ -1186,7 +1147,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Assigns result of function 'f(size_t i)' to all items in the array. //! \~english Assigns result of function 'f(size_t i)' to all items in the array.
//! \~russian Заполняет весь массив результатом вызова функции 'f(size_t i)'. //! \~russian Заполняет весь массив результатом вызова функции 'f(size_t i)'.
//! \~\details //! \~\details
@@ -1205,13 +1165,11 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Same as \a fill(). //! \~english Same as \a fill().
//! \~russian Тоже самое что и \a fill(). //! \~russian Тоже самое что и \a fill().
//! \~\sa \a fill(), \a resize() //! \~\sa \a fill(), \a resize()
inline PIVector<T> & assign(const T & e = T()) {return fill(e);} inline PIVector<T> & assign(const T & e = T()) {return fill(e);}
//! \~\brief
//! \~english First does `resize(new_size)` then `fill(e)`. //! \~english First does `resize(new_size)` then `fill(e)`.
//! \~russian Сначала делает `resize(new_size)`, затем `fill(e)`. //! \~russian Сначала делает `resize(new_size)`, затем `fill(e)`.
//! \~\sa \a fill(), \a resize() //! \~\sa \a fill(), \a resize()
@@ -1230,7 +1188,6 @@ public:
return fill(f); return fill(f);
} }
//! \~\brief
//! \~english Sets size of the array, new elements are copied from `e`. //! \~english Sets size of the array, new elements are copied from `e`.
//! \~russian Устанавливает размер массива, новые элементы копируются из `e`. //! \~russian Устанавливает размер массива, новые элементы копируются из `e`.
//! \~\details //! \~\details
@@ -1259,7 +1216,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Sets size of the array, new elements created by function `f(size_t i)`. //! \~english Sets size of the array, new elements created by function `f(size_t i)`.
//! \~russian Устанавливает размер массива, новые элементы создаются функцией `f(size_t i)`. //! \~russian Устанавливает размер массива, новые элементы создаются функцией `f(size_t i)`.
//! \~\details //! \~\details
@@ -1306,7 +1262,6 @@ public:
newT(dst, src, size); newT(dst, src, size);
} }
//! \~\brief
//! \~english Attempts to allocate memory for at least `new_size` elements. //! \~english Attempts to allocate memory for at least `new_size` elements.
//! \~russian Резервируется память под как минимум `new_size` элементов. //! \~russian Резервируется память под как минимум `new_size` элементов.
//! \~\details //! \~\details
@@ -1329,7 +1284,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Inserts value `e` at `index` position in the array. //! \~english Inserts value `e` at `index` position in the array.
//! \~russian Вставляет значение `e` в позицию `index` в массиве. //! \~russian Вставляет значение `e` в позицию `index` в массиве.
//! \~\details //! \~\details
@@ -1352,7 +1306,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Inserts value `e` at `index` position in the array. //! \~english Inserts value `e` at `index` position in the array.
//! \~russian Вставляет значение `e` в позицию `index` в массиве. //! \~russian Вставляет значение `e` в позицию `index` в массиве.
//! \~\details //! \~\details
@@ -1370,7 +1323,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Inserts array `v` at `index` position in the array. //! \~english Inserts array `v` at `index` position in the array.
//! \~russian Вставляет массив `v` в позицию `index` в массиве. //! \~russian Вставляет массив `v` в позицию `index` в массиве.
//! \~\details //! \~\details
@@ -1394,7 +1346,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Inserts the given elements at `index` position in the array. //! \~english Inserts the given elements at `index` position in the array.
//! \~russian Вставляет элементы в позицию `index` в массиве. //! \~russian Вставляет элементы в позицию `index` в массиве.
//! \~\details //! \~\details
@@ -1415,7 +1366,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Removes `count` elements from the middle of the array, starting at `index` position. //! \~english Removes `count` elements from the middle of the array, starting at `index` position.
//! \~russian Удаляет элементы из массива, начиная с позиции `index` в количестве `count`. //! \~russian Удаляет элементы из массива, начиная с позиции `index` в количестве `count`.
//! \~\details //! \~\details
@@ -1438,7 +1388,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Swaps array `v` other with this array. //! \~english Swaps array `v` other with this array.
//! \~russian Меняет местами массив `v` с этим массивом. //! \~russian Меняет местами массив `v` с этим массивом.
//! \~\details //! \~\details
@@ -1450,7 +1399,6 @@ public:
piSwap<size_t>(piv_rsize, v.piv_rsize); piSwap<size_t>(piv_rsize, v.piv_rsize);
} }
//! \~\brief
//! \~english Sorts the elements in non-descending order. //! \~english Sorts the elements in non-descending order.
//! \~russian Сортировка элементов в порядке возрастания. //! \~russian Сортировка элементов в порядке возрастания.
//! \~\details //! \~\details
@@ -1473,7 +1421,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Sorts the elements in non-descending order. //! \~english Sorts the elements in non-descending order.
//! \~russian Сортировка элементов в порядке возрастания. //! \~russian Сортировка элементов в порядке возрастания.
//! \~\details //! \~\details
@@ -1512,7 +1459,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Reverses this array. //! \~english Reverses this array.
//! \~russian Обращает порядок следования элементов этого массива. //! \~russian Обращает порядок следования элементов этого массива.
//! \~\details //! \~\details
@@ -1537,7 +1483,6 @@ public:
return *this; return *this;
} }
//! \~\brief
//! \~english Returns reversed array. //! \~english Returns reversed array.
//! \~russian Возвращает перевернутый массив. //! \~russian Возвращает перевернутый массив.
//! \~\details //! \~\details
@@ -1551,7 +1496,6 @@ public:
return ret.reverse(); return ret.reverse();
} }
//! \~\brief
//! \~english Increases or decreases the size of the array by `add_size` elements. //! \~english Increases or decreases the size of the array by `add_size` elements.
//! \~russian Увеличивает или уменьшает размер массива на `add_size` элементов. //! \~russian Увеличивает или уменьшает размер массива на `add_size` элементов.
//! \~\details //! \~\details
@@ -1569,7 +1513,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove no more than one element equal `e`. //! \~english Remove no more than one element equal `e`.
//! \~russian Удаляет первый элемент, который равен элементу `e`. //! \~russian Удаляет первый элемент, который равен элементу `e`.
//! \~\details //! \~\details
@@ -1589,7 +1532,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove all elements equal `e`. //! \~english Remove all elements equal `e`.
//! \~russian Удаляет все элементы, равные элементу `e`. //! \~russian Удаляет все элементы, равные элементу `e`.
//! \~\details //! \~\details
@@ -1609,7 +1551,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove all elements in the array //! \~english Remove all elements in the array
//! passes the test implemented by the provided function `test`. //! passes the test implemented by the provided function `test`.
//! \~russian Удаляет все элементы, удовлетворяющие условию, //! \~russian Удаляет все элементы, удовлетворяющие условию,
@@ -1631,7 +1572,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1663,7 +1603,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1677,7 +1616,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given elements to the end of the array. //! \~english Appends the given elements to the end of the array.
//! \~russian Добавляет элементы в конец массива. //! \~russian Добавляет элементы в конец массива.
//! \~\details //! \~\details
@@ -1695,7 +1633,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given array `v` to the end of the array. //! \~english Appends the given array `v` to the end of the array.
//! \~russian Добавляет массив `v` в конец массива. //! \~russian Добавляет массив `v` в конец массива.
//! \~\details //! \~\details
@@ -1715,7 +1652,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1743,7 +1679,6 @@ public:
//! \~\sa \a prepend(), \a push_front(), \a push_back(), \a insert() //! \~\sa \a prepend(), \a push_front(), \a push_back(), \a insert()
inline PIVector<T> & append(const T & e) {return push_back(e);} inline PIVector<T> & append(const T & e) {return push_back(e);}
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1752,7 +1687,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIVector<T> & append(T && e) {return push_back(std::move(e));} inline PIVector<T> & append(T && e) {return push_back(std::move(e));}
//! \brief
//! \~english Appends the given elements to the end of the array. //! \~english Appends the given elements to the end of the array.
//! \~russian Добавляет элементы в конец массива. //! \~russian Добавляет элементы в конец массива.
//! \~\details //! \~\details
@@ -1765,7 +1699,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIVector<T> & append(std::initializer_list<T> init_list) {return push_back(init_list);} inline PIVector<T> & append(std::initializer_list<T> init_list) {return push_back(init_list);}
//! \brief
//! \~english Appends the given array `v` to the end of the array. //! \~english Appends the given array `v` to the end of the array.
//! \~russian Добавляет массив `v` в конец массива. //! \~russian Добавляет массив `v` в конец массива.
//! \~\details //! \~\details
@@ -1779,7 +1712,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIVector<T> & append(const PIVector<T> & v) {return push_back(v);} inline PIVector<T> & append(const PIVector<T> & v) {return push_back(v);}
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1791,7 +1723,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIVector<T> & operator <<(const T & e) {return push_back(e);} inline PIVector<T> & operator <<(const T & e) {return push_back(e);}
//! \brief
//! \~english Appends the given element `e` to the end of the array. //! \~english Appends the given element `e` to the end of the array.
//! \~russian Добавляет элемент `e` в конец массива. //! \~russian Добавляет элемент `e` в конец массива.
//! \~\details //! \~\details
@@ -1803,7 +1734,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIVector<T> & operator <<(T && e) {return push_back(std::move(e));} inline PIVector<T> & operator <<(T && e) {return push_back(std::move(e));}
//! \brief
//! \~english Appends the given array `v` to the end of the array. //! \~english Appends the given array `v` to the end of the array.
//! \~russian Добавляет массив `v` в конец массива. //! \~russian Добавляет массив `v` в конец массива.
//! \~\details //! \~\details
@@ -1815,7 +1745,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIVector<T> & operator <<(const PIVector<T> & v) {return push_back(v);} inline PIVector<T> & operator <<(const PIVector<T> & v) {return push_back(v);}
//! \brief
//! \~english Appends the given element `e` to the begin of the array. //! \~english Appends the given element `e` to the begin of the array.
//! \~russian Добавляет элемент `e` в начало массива. //! \~russian Добавляет элемент `e` в начало массива.
//! \~\details //! \~\details
@@ -1837,7 +1766,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the begin of the array. //! \~english Appends the given element `e` to the begin of the array.
//! \~russian Добавляет элемент `e` в начало массива. //! \~russian Добавляет элемент `e` в начало массива.
//! \~\details //! \~\details
@@ -1849,7 +1777,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given array `v` to the begin of the array. //! \~english Appends the given array `v` to the begin of the array.
//! \~russian Добавляет массив `v` в начало массива. //! \~russian Добавляет массив `v` в начало массива.
//! \~\details //! \~\details
@@ -1866,7 +1793,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given elements to the begin of the array. //! \~english Appends the given elements to the begin of the array.
//! \~russian Добавляет элементы в начало массива. //! \~russian Добавляет элементы в начало массива.
//! \~\details //! \~\details
@@ -1882,7 +1808,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Appends the given element `e` to the begin of the array. //! \~english Appends the given element `e` to the begin of the array.
//! \~russian Добавляет элемент `e` в начало массива. //! \~russian Добавляет элемент `e` в начало массива.
//! \~\details //! \~\details
@@ -1901,7 +1826,6 @@ public:
//! \~\sa \a append(), \a push_back(), \a push_front(), \a insert() //! \~\sa \a append(), \a push_back(), \a push_front(), \a insert()
inline PIVector<T> & prepend(const T & e) {return push_front(e);} inline PIVector<T> & prepend(const T & e) {return push_front(e);}
//! \brief
//! \~english Appends the given element `e` to the begin of the array. //! \~english Appends the given element `e` to the begin of the array.
//! \~russian Добавляет элемент `e` в начало массива. //! \~russian Добавляет элемент `e` в начало массива.
//! \~\details //! \~\details
@@ -1910,7 +1834,6 @@ public:
//! \~\sa \a prepend() //! \~\sa \a prepend()
inline PIVector<T> & prepend(T && e) {return push_front(std::move(e));} inline PIVector<T> & prepend(T && e) {return push_front(std::move(e));}
//! \brief
//! \~english Appends the given array `v` to the begin of the array. //! \~english Appends the given array `v` to the begin of the array.
//! \~russian Добавляет массив `v` в начало массива. //! \~russian Добавляет массив `v` в начало массива.
//! \~\details //! \~\details
@@ -1924,7 +1847,6 @@ public:
//! \~\sa \a prepend() //! \~\sa \a prepend()
inline PIVector<T> & prepend(const PIVector<T> & v) {return push_front(v);} inline PIVector<T> & prepend(const PIVector<T> & v) {return push_front(v);}
//! \brief
//! \~english Appends the given elements to the begin of the array. //! \~english Appends the given elements to the begin of the array.
//! \~russian Добавляет элементы в начало массива. //! \~russian Добавляет элементы в начало массива.
//! \~\details //! \~\details
@@ -1937,7 +1859,6 @@ public:
//! \~\sa \a append() //! \~\sa \a append()
inline PIVector<T> & prepend(std::initializer_list<T> init_list) {return prepend(init_list);} inline PIVector<T> & prepend(std::initializer_list<T> init_list) {return prepend(init_list);}
//! \brief
//! \~english Remove one element from the end of the array. //! \~english Remove one element from the end of the array.
//! \~russian Удаляет один элемент с конца массива. //! \~russian Удаляет один элемент с конца массива.
//! \~\details //! \~\details
@@ -1957,7 +1878,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove one element from the begining of the array. //! \~english Remove one element from the begining of the array.
//! \~russian Удаляет один элемент с начала массива. //! \~russian Удаляет один элемент с начала массива.
//! \~\details //! \~\details
@@ -1979,7 +1899,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Remove one element from the end of the array and return it. //! \~english Remove one element from the end of the array and return it.
//! \~russian Удаляет один элемент с начала массива и возвращает его. //! \~russian Удаляет один элемент с начала массива и возвращает его.
//! \~\details //! \~\details
@@ -1995,7 +1914,6 @@ public:
return e; return e;
} }
//! \brief
//! \~english Remove one element from the begining of the array and return it. //! \~english Remove one element from the begining of the array and return it.
//! \~russian Удаляет один элемент с конца массива и возвращает его. //! \~russian Удаляет один элемент с конца массива и возвращает его.
//! \~\details //! \~\details
@@ -2011,7 +1929,6 @@ public:
return e; return e;
} }
//! \brief
//! \~english Returns an array converted to another type. //! \~english Returns an array converted to another type.
//! \~russian Возвращает конвертированный в другой тип массив. //! \~russian Возвращает конвертированный в другой тип массив.
//! \~\details //! \~\details
@@ -2030,7 +1947,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Returns a new array with all elements //! \~english Returns a new array with all elements
//! that pass the test implemented by the provided function `test`. //! that pass the test implemented by the provided function `test`.
//! \~russian Возвращает новый массив со всеми элементами, //! \~russian Возвращает новый массив со всеми элементами,
@@ -2050,7 +1966,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Execute function `void f(const T & e)` for every element in array. //! \~english Execute function `void f(const T & e)` for every element in array.
//! \~russian Выполняет функцию `void f(const T & e)` для каждого элемента массива. //! \~russian Выполняет функцию `void f(const T & e)` для каждого элемента массива.
//! \~\details //! \~\details
@@ -2071,7 +1986,6 @@ public:
} }
} }
//! \brief
//! \~english Execute function `void f(T & e)` for every element in array. //! \~english Execute function `void f(T & e)` for every element in array.
//! \~russian Выполняет функцию `void f(T & e)` для каждого элемента массива. //! \~russian Выполняет функцию `void f(T & e)` для каждого элемента массива.
//! \~\details //! \~\details
@@ -2092,7 +2006,6 @@ public:
return *this; return *this;
} }
//! \brief
//! \~english Сreates a new array populated with the results //! \~english Сreates a new array populated with the results
//! of calling a provided function `ST f(const T & e)` on every element in the calling array. //! of calling a provided function `ST f(const T & e)` on every element in the calling array.
//! \~russian Создаёт новый массив с результатом вызова указанной функции //! \~russian Создаёт новый массив с результатом вызова указанной функции
@@ -2119,7 +2032,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Applies the function `ST f(const T & e, const ST & acc)` //! \~english Applies the function `ST f(const T & e, const ST & acc)`
//! to each element of the array (from left to right), returns one value. //! to each element of the array (from left to right), returns one value.
//! \~russian Применяет функцию `ST f(const T & e, const ST & acc)` //! \~russian Применяет функцию `ST f(const T & e, const ST & acc)`
@@ -2170,7 +2082,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Changes the dimension of the array, creates a two-dimensional array from a one-dimensional array. //! \~english Changes the dimension of the array, creates a two-dimensional array from a one-dimensional array.
//! \~russian Изменяет размерность массива, из одномерного массива создает двухмерный. //! \~russian Изменяет размерность массива, из одномерного массива создает двухмерный.
//! \~\details //! \~\details
@@ -2216,7 +2127,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Changes the dimension of the array, creates a one-dimensional array from a two-dimensional array. //! \~english Changes the dimension of the array, creates a one-dimensional array from a two-dimensional array.
//! \~russian Изменяет размерность массива, из двухмерный массива создает одномерный. //! \~russian Изменяет размерность массива, из двухмерный массива создает одномерный.
//! \~\details //! \~\details
@@ -2256,7 +2166,6 @@ public:
return ret; return ret;
} }
//! \brief
//! \~english Changes the dimension of the two-dimensional array. //! \~english Changes the dimension of the two-dimensional array.
//! \~russian Изменяет размерность двухмерного массива. //! \~russian Изменяет размерность двухмерного массива.
//! \~\details //! \~\details