Compare commits
4 Commits
6485d81025
...
416b142889
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
416b142889 | ||
|
|
cb4df7dc42 | ||
|
|
99a4546775 | ||
|
|
8a9864a91c |
@@ -165,8 +165,8 @@ template <typename C> _PIReverseWrapper<C> PIReverseWrap(const C & c) {return _P
|
|||||||
//! \~russian Порядок обхода для функции изменения размерности reshape().
|
//! \~russian Порядок обхода для функции изменения размерности reshape().
|
||||||
//! \~ \sa \a PIVector::reshape(), \a PIDeque::reshape()
|
//! \~ \sa \a PIVector::reshape(), \a PIDeque::reshape()
|
||||||
enum ReshapeOrder {
|
enum ReshapeOrder {
|
||||||
ReshapeByRow,
|
ReshapeByRow /*! \~english Traversing elements by line, just as they stay in memory \~russian Обход элементов построчно, так же как они находятся в памяти */,
|
||||||
ReshapeByColumn
|
ReshapeByColumn /*! \~english Traversing elements by column \~russian Обход элементов по столбцам */,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PICONTAINERS_H
|
#endif // PICONTAINERS_H
|
||||||
|
|||||||
@@ -118,15 +118,19 @@ template <typename T>
|
|||||||
class PIDeque {
|
class PIDeque {
|
||||||
public:
|
public:
|
||||||
typedef bool (*CompareFunc)(const T & , const T & );
|
typedef bool (*CompareFunc)(const T & , const T & );
|
||||||
|
typedef T value_type;
|
||||||
|
typedef T* pointer;
|
||||||
|
typedef const T* const_pointer;
|
||||||
|
typedef T& reference;
|
||||||
|
typedef const T& const_reference;
|
||||||
|
typedef size_t size_type;
|
||||||
|
|
||||||
//! \~\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 +139,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 +154,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 +164,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 +171,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 +189,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 +204,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 +214,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 +245,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 +254,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 +332,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 +341,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 +421,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 +430,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 +507,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 +516,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 +573,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Iterator to the first element.
|
//! \~english Iterator to the first element.
|
||||||
//! \~russian Итератор на первый элемент.
|
//! \~russian Итератор на первый элемент.
|
||||||
//! \~\details 
|
//! \~\details 
|
||||||
@@ -587,7 +583,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 
|
//! \~\details 
|
||||||
@@ -603,7 +598,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 
|
//! \~\details 
|
||||||
@@ -617,7 +611,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 +629,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 +654,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 +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 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 +670,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 +695,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 +720,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 +739,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 +750,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 +762,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 +774,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 +784,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 +831,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 +868,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 +902,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 +944,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 +985,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 +1030,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 +1066,6 @@ public:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Pointer to array
|
//! \~english Pointer to array
|
||||||
//! \~russian Указатель на память массива
|
//! \~russian Указатель на память массива
|
||||||
//! \~\details
|
//! \~\details
|
||||||
@@ -1110,7 +1081,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 +1100,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 +1122,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 +1146,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 +1164,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 +1182,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 +1205,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 +1235,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 +1283,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 +1305,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 +1336,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 +1362,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 +1393,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 +1421,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 +1452,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 +1464,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 +1486,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 +1525,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Reverses this array.
|
//! \~english Reverses this array.
|
||||||
//! \~russian Обращает порядок следования элементов этого массива.
|
//! \~russian Обращает порядок следования элементов этого массива.
|
||||||
//! \~\details
|
//! \~\details
|
||||||
@@ -1597,7 +1549,6 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Returns reversed array.
|
//! \~english Returns reversed array.
|
||||||
//! \~russian Возвращает перевернутый массив.
|
//! \~russian Возвращает перевернутый массив.
|
||||||
//! \~\details
|
//! \~\details
|
||||||
@@ -1611,7 +1562,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 +1579,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 +1598,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 +1617,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 +1638,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 +1669,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 +1682,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 +1699,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 +1718,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 +1744,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 +1752,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 +1764,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 +1777,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 +1788,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 +1799,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 +1810,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 +1839,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 +1850,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 +1866,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 +1881,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 +1907,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 +1915,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 +1928,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 +1940,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 +1959,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 +1980,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 +1995,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 +2010,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 +2028,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 +2047,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 +2067,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 +2087,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 +2113,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 +2163,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 +2208,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 +2247,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
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
/*! \file pipair.h
|
//! \addtogroup Containers
|
||||||
* \brief pair
|
//! \{
|
||||||
*
|
//! \file pipair.h
|
||||||
* This file declare PIPair
|
//! \brief
|
||||||
*/
|
//! \~english Declares \a PIPair
|
||||||
|
//! \~russian Объявление \a PIPair
|
||||||
|
//! \~\authors
|
||||||
|
//! \~english
|
||||||
|
//! Ivan Pelipenko peri4ko@yandex.ru;
|
||||||
|
//! Andrey Bychkov work.a.b@yandex.ru;
|
||||||
|
//! \~russian
|
||||||
|
//! Иван Пелипенко peri4ko@yandex.ru;
|
||||||
|
//! Андрей Бычков work.a.b@yandex.ru;
|
||||||
|
//! \~\}
|
||||||
/*
|
/*
|
||||||
PIP - Platform Independent Primitives
|
PIP - Platform Independent Primitives
|
||||||
pair
|
pair
|
||||||
@@ -27,30 +36,88 @@
|
|||||||
|
|
||||||
#include "picout.h"
|
#include "picout.h"
|
||||||
|
|
||||||
class PICout;
|
|
||||||
|
|
||||||
|
//! \addtogroup Containers
|
||||||
|
//! \{
|
||||||
|
//! \class PIPair
|
||||||
|
//! \brief
|
||||||
|
//! \~english
|
||||||
|
//! \~russian Класс, который позволяет хранить два разнородных объекта как единое целое.
|
||||||
|
//! \~\}
|
||||||
|
//! \details
|
||||||
|
//! \~english
|
||||||
|
//! \~russian
|
||||||
|
//! \~\sa \a PIMap
|
||||||
template<typename Type0, typename Type1>
|
template<typename Type0, typename Type1>
|
||||||
class PIPair {
|
class PIPair {
|
||||||
public:
|
public:
|
||||||
PIPair() {first = Type0(); second = Type1();}
|
PIPair() : first(), second() {}
|
||||||
PIPair(std::tuple<Type0, Type1> tuple) {first = std::get<0>(tuple); second = std::get<1>(tuple);}
|
PIPair(std::tuple<Type0, Type1> tuple) {
|
||||||
PIPair(const Type0 & value0, const Type1 & value1) {first = value0; second = value1;}
|
first = std::get<0>(tuple);
|
||||||
|
second = std::get<1>(tuple);
|
||||||
|
}
|
||||||
|
PIPair(const Type0 & value0, const Type1 & value1) {
|
||||||
|
first = value0;
|
||||||
|
second = value1;
|
||||||
|
}
|
||||||
|
PIPair(Type0 && value0, Type1 && value1) {
|
||||||
|
first = std::move(value0);
|
||||||
|
second = std::move(value1);
|
||||||
|
}
|
||||||
Type0 first;
|
Type0 first;
|
||||||
Type1 second;
|
Type1 second;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//! \~english Compare operator with PIPair.
|
||||||
|
//! \~russian Оператор сравнения с PIPair.
|
||||||
template<typename Type0, typename Type1>
|
template<typename Type0, typename Type1>
|
||||||
inline bool operator <(const PIPair<Type0, Type1> & value0, const PIPair<Type0, Type1> & value1) {return value0.first < value1.first;}
|
inline bool operator ==(const PIPair<Type0, Type1> & value0, const PIPair<Type0, Type1> & value1) {
|
||||||
|
return (value0.first == value1.first) && (value0.second == value1.second);
|
||||||
|
}
|
||||||
|
|
||||||
|
//! \~english Compare operator with PIPair.
|
||||||
|
//! \~russian Оператор сравнения с PIPair.
|
||||||
template<typename Type0, typename Type1>
|
template<typename Type0, typename Type1>
|
||||||
inline bool operator ==(const PIPair<Type0, Type1> & value0, const PIPair<Type0, Type1> & value1) {return (value0.first == value1.first) && (value0.second == value1.second);}
|
inline bool operator !=(const PIPair<Type0, Type1> & value0, const PIPair<Type0, Type1> & value1) {
|
||||||
template<typename Type0, typename Type1>
|
return (value0.first != value1.first) || (value0.second != value1.second);
|
||||||
inline bool operator !=(const PIPair<Type0, Type1> & value0, const PIPair<Type0, Type1> & value1) {return (value0.first != value1.first) || (value0.second != value1.second);}
|
}
|
||||||
|
|
||||||
#ifdef PIP_STD_IOSTREAM
|
#ifdef PIP_STD_IOSTREAM
|
||||||
template<typename Type0, typename Type1>
|
template<typename Type0, typename Type1>
|
||||||
inline std::ostream & operator <<(std::ostream & s, const PIPair<Type0, Type1> & v) {s << "(" << v.first << ", " << v.second << ")"; return s;}
|
inline std::ostream & operator <<(std::ostream & s, const PIPair<Type0, Type1> & v) {
|
||||||
|
s << "(" << v.first << ", " << v.second << ")";
|
||||||
|
return s;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename Type0, typename Type1>
|
template<typename Type0, typename Type1>
|
||||||
inline PICout operator <<(PICout s, const PIPair<Type0, Type1> & v) {s.space(); s.setControl(0, true); s << "(" << v.first << ", " << v.second << ")"; s.restoreControl(); return s;}
|
inline PICout operator <<(PICout s, const PIPair<Type0, Type1> & v) {
|
||||||
|
s.space();
|
||||||
|
s.setControl(0, true);
|
||||||
|
s << "(" << v.first << ", " << v.second << ")";
|
||||||
|
s.restoreControl();
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//! \~english Creates \a PIPair object, deducing the target type from the types of arguments.
|
||||||
|
//! \~russian Создает \a PIPair выводя типы из аргументов.
|
||||||
|
//! \~\details
|
||||||
|
//! \~\code
|
||||||
|
//! auto p = createPIPair(1, 'a');
|
||||||
|
//! piCout << p; // (1, a)
|
||||||
|
//! \endcode
|
||||||
|
template< class T1, class T2 >
|
||||||
|
PIPair<T1,T2> createPIPair(const T1 & f, const T2 & s) {
|
||||||
|
return PIPair<T1,T2>(f, s);
|
||||||
|
}
|
||||||
|
|
||||||
|
//! \~english Creates \a PIPair object, deducing the target type from the types of arguments.
|
||||||
|
//! \~russian Создает \a PIPair выводя типы из аргументов.
|
||||||
|
//! \sa \a createPIPair()
|
||||||
|
template< class T1, class T2 >
|
||||||
|
PIPair<T1,T2> createPIPair(T1 && f, T2 && s) {
|
||||||
|
return PIPair<T1,T2>(std::move(f), std::move(s));
|
||||||
|
}
|
||||||
|
|
||||||
#endif // PIPAIR_H
|
#endif // PIPAIR_H
|
||||||
|
|||||||
@@ -118,15 +118,19 @@ template <typename T>
|
|||||||
class PIVector {
|
class PIVector {
|
||||||
public:
|
public:
|
||||||
typedef bool (*CompareFunc)(const T & , const T & );
|
typedef bool (*CompareFunc)(const T & , const T & );
|
||||||
|
typedef T value_type;
|
||||||
|
typedef T* pointer;
|
||||||
|
typedef const T* const_pointer;
|
||||||
|
typedef T& reference;
|
||||||
|
typedef const T& const_reference;
|
||||||
|
typedef size_t size_type;
|
||||||
|
|
||||||
//! \~\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 +141,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 +149,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 +164,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 +171,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 +189,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 +204,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 +215,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 +246,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 +255,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 +333,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 +342,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 +422,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 +431,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 +508,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 +517,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 +573,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Iterator to the first element.
|
//! \~english Iterator to the first element.
|
||||||
//! \~russian Итератор на первый элемент.
|
//! \~russian Итератор на первый элемент.
|
||||||
//! \~\details 
|
//! \~\details 
|
||||||
@@ -587,7 +583,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 
|
//! \~\details 
|
||||||
@@ -603,7 +598,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 
|
//! \~\details 
|
||||||
@@ -617,7 +611,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 +629,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 +652,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 +660,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 +668,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 +693,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 +718,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 +737,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 +748,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 +760,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 +772,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 +782,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 +829,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 +866,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 +900,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 +940,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 +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`
|
||||||
@@ -1049,7 +1022,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 +1056,6 @@ public:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Pointer to array
|
//! \~english Pointer to array
|
||||||
//! \~russian Указатель на память массива
|
//! \~russian Указатель на память массива
|
||||||
//! \~\details
|
//! \~\details
|
||||||
@@ -1100,7 +1071,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 +1090,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 +1112,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 +1135,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 +1153,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 +1171,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 +1194,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 +1222,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 +1268,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 +1290,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 +1312,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 +1329,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 +1352,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 +1372,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 +1394,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 +1405,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 +1427,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 +1465,6 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Reverses this array.
|
//! \~english Reverses this array.
|
||||||
//! \~russian Обращает порядок следования элементов этого массива.
|
//! \~russian Обращает порядок следования элементов этого массива.
|
||||||
//! \~\details
|
//! \~\details
|
||||||
@@ -1537,7 +1489,6 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \~\brief
|
|
||||||
//! \~english Returns reversed array.
|
//! \~english Returns reversed array.
|
||||||
//! \~russian Возвращает перевернутый массив.
|
//! \~russian Возвращает перевернутый массив.
|
||||||
//! \~\details
|
//! \~\details
|
||||||
@@ -1551,7 +1502,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 +1519,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 +1538,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 +1557,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 +1578,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 +1609,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 +1622,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 +1639,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 +1658,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 +1685,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 +1693,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 +1705,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 +1718,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 +1729,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 +1740,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 +1751,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 +1772,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 +1783,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 +1799,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 +1814,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 +1832,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 +1840,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 +1853,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 +1865,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 +1884,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 +1905,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 +1920,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 +1935,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 +1953,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 +1972,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 +1992,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 +2012,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 +2038,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 +2088,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 +2133,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 +2172,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
|
||||||
|
|||||||
Reference in New Issue
Block a user