GEOSX
|
Contains functions for operating on a contiguous array of values. More...
Functions | |
template<typename INDEX_TYPE > | |
constexpr std::enable_if< std::is_signed< INDEX_TYPE >::value, bool >::type | isPositive (INDEX_TYPE const i) |
template<typename INDEX_TYPE > | |
constexpr std::enable_if< !std::is_signed< INDEX_TYPE >::value, bool >::type | isPositive (INDEX_TYPE) |
template<typename ITER > | |
constexpr std::iterator_traits< ITER >::difference_type | iterDistance (ITER first, ITER const last, std::input_iterator_tag) |
template<typename RandomAccessIterator > | |
constexpr std::iterator_traits< RandomAccessIterator >::difference_type | iterDistance (RandomAccessIterator first, RandomAccessIterator last, std::random_access_iterator_tag) |
template<typename ITER > | |
constexpr std::iterator_traits< ITER >::difference_type | iterDistance (ITER const first, ITER const last) |
template<typename T > | |
void | destroy (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size) |
Destory the values in the array. More... | |
template<typename ITER , typename T > | |
void | uninitializedCopy (ITER first, ITER const &last, T *LVARRAY_RESTRICT dst) |
Copy construct values from the source to the destination. More... | |
template<typename T > | |
void | uninitializedMove (T *const LVARRAY_RESTRICT dst, std::ptrdiff_t const size, T *const LVARRAY_RESTRICT src) |
Move construct values from the source to the destination. More... | |
template<typename T > | |
void | uninitializedShiftDown (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, std::ptrdiff_t const amount) |
Shift values down into uninitialized memory. More... | |
template<typename T > | |
void | uninitializedShiftUp (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, std::ptrdiff_t const amount) |
Shift values up into uninitialized memory. More... | |
template<typename T , typename ... ARGS> | |
void | resize (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, std::ptrdiff_t const newSize, ARGS &&... args) |
Resize the give array. More... | |
template<typename T > | |
void | shiftUp (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, std::ptrdiff_t const index, std::ptrdiff_t const n) |
Shift the values in the array at or above the given position up by the given amount. New uninitialized values take their place. More... | |
template<typename T > | |
void | shiftDown (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, std::ptrdiff_t const index, std::ptrdiff_t const n) |
Shift the values in the array at or above the given position down by the given amount overwriting the existing values. The n entries at the end of the array are not destroyed. More... | |
template<typename T > | |
void | erase (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, std::ptrdiff_t const index, std::ptrdiff_t const n=1) |
Shift the values in the array at or above the given position down by the given amount overwriting the existing values. The n entries at the end of the array are then destroyed. More... | |
template<typename T , typename ... ARGS> | |
void | emplaceBack (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, ARGS &&... args) |
Append the to the array constructing the new value in place. More... | |
template<typename T , typename ITER > | |
std::ptrdiff_t | append (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, ITER first, ITER const last) |
Append the given values to the array. More... | |
template<typename T , typename ... ARGS> | |
void | emplace (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, std::ptrdiff_t const index, ARGS &&... args) |
Insert into the array constructing the new value in place. More... | |
template<typename T , typename ITERATOR > | |
void | insert (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size, std::ptrdiff_t const index, ITERATOR first, std::ptrdiff_t const n) |
Insert the given values into the array at the given position. More... | |
template<typename T > | |
void | popBack (T *const LVARRAY_RESTRICT ptr, std::ptrdiff_t const size) |
Destroy the value at the end of the array. More... | |
Contains functions for operating on a contiguous array of values.
Most functions accept a pointer and a size as the first two arguments. Values in this range are expected to be in a valid state. Values past the end of the array are expected to be uninitialized. Functions that increase the size of the array expect the array to have a large enough capacity to handle the increase.
|
inline |
Append the given values to the array.
T | The storage type of the array. |
ITER | The type of the iterators first and last . |
ptr | Pointer to the array. |
size | The size of the array. |
first | An iterator to the first value to append. |
last | An iterator to the end of the values to append. |
Definition at line 426 of file arrayManipulation.hpp.
|
inline |
Destory the values in the array.
T | the storage type of the array. |
ptr | Pointer to the array. |
size | The size of the array. |
Definition at line 146 of file arrayManipulation.hpp.
|
inline |
Insert into the array constructing the new value in place.
T | The storage type of the array. |
ARGS | Variadic pack of types to construct T with, the types of args . |
ptr | Pointer to the array. |
size | The size of the array. |
index | The position to insert at. |
args | The arguments to forward to construct the new value. |
Definition at line 457 of file arrayManipulation.hpp.
|
inline |
Append the to the array constructing the new value in place.
T | The storage type of the array. |
ARGS | Variadic pack of types to construct T with, the types of args . |
ptr | Pointer to the array. |
size | The size of the array. |
args | The arguments to forward to construct the new value. |
Definition at line 404 of file arrayManipulation.hpp.
|
inline |
Shift the values in the array at or above the given position down by the given amount overwriting the existing values. The n entries at the end of the array are then destroyed.
T | the storage type of the array. |
ptr | Pointer to the array. |
size | The size of the array. |
index | the index at which to begin the shift. |
n | the number of places to shift. |
Definition at line 375 of file arrayManipulation.hpp.
|
inline |
Insert the given values into the array at the given position.
T | The storage type of the array. |
ITERATOR | An iterator type, the type of first . |
ptr | Pointer to the array. |
size | The size of the array. |
index | The position to insert the value at. |
first | Iterator to the first value to insert. |
n | The number of values to insert. |
Definition at line 484 of file arrayManipulation.hpp.
|
inline |
INDEX_TYPE | the integral type to check. |
i
is greater than or equal to zero. i | the value to check. |
Definition at line 76 of file arrayManipulation.hpp.
|
inline |
INDEX_TYPE | the integral type to check. |
Definition at line 86 of file arrayManipulation.hpp.
|
inline |
ITER | An iterator type. |
first | The iterator to the beginning of the range. |
last | The iterator to the end of the range. |
Definition at line 99 of file arrayManipulation.hpp.
|
inline |
ITER | An iterator type. |
first | The iterator to the beginning of the range. |
last | The iterator to the end of the range. |
Definition at line 121 of file arrayManipulation.hpp.
|
inline |
ITER | An iterator type. |
first | The iterator to the beginning of the range. |
last | The iterator to the end of the range. |
Definition at line 134 of file arrayManipulation.hpp.
|
inline |
Destroy the value at the end of the array.
T | the storage type of the array. |
ptr | Pointer to the array. |
size | The size of the array. |
Definition at line 512 of file arrayManipulation.hpp.
|
inline |
Resize the give array.
T | the storage type of the array. |
ARGS | the types of the arguments to forward to the constructor. |
ptr | Pointer to the array. |
size | The size of the array. |
newSize | the new size. |
args | the arguments to forward to construct any new elements with. |
Definition at line 274 of file arrayManipulation.hpp.
|
inline |
Shift the values in the array at or above the given position down by the given amount overwriting the existing values. The n entries at the end of the array are not destroyed.
T | the storage type of the array. |
ptr | Pointer to the array. |
size | The size of the array. |
index | the index at which to begin the shift. |
n | the number of places to shift. |
Definition at line 342 of file arrayManipulation.hpp.
|
inline |
Shift the values in the array at or above the given position up by the given amount. New uninitialized values take their place.
T | the storage type of the array. |
ptr | Pointer to the array. |
size | The size of the array. |
index | the index at which to begin the shift. |
n | the number of places to shift. |
Definition at line 305 of file arrayManipulation.hpp.
|
inline |
Copy construct values from the source to the destination.
ITER | An iterator type. |
T | the storage type of the array. |
first | Iterator to the first value to copy. |
last | Iterator to the end of the values to copy. |
dst | Pointer to the destination array, must be uninitialized memory. |
Definition at line 168 of file arrayManipulation.hpp.
|
inline |
Move construct values from the source to the destination.
T | the storage type of the array. |
dst | pointer to the destination array, must be uninitialized memory. |
size | The number of values to copy. |
src | pointer to the source array. |
Definition at line 192 of file arrayManipulation.hpp.
|
inline |
Shift values down into uninitialized memory.
T | the storage type of the array. |
ptr | Pointer to the begining of the shift, values before this must be uninitialized. |
size | number of values to shift. |
amount | the amount to shift by. |
Definition at line 216 of file arrayManipulation.hpp.
|
inline |
Shift values up into uninitialized memory.
T | the storage type of the array. |
ptr | Pointer to the begining of the shift. |
size | number of values to shift, values after this must be uninitialized. |
amount | the amount to shift by. |
Definition at line 244 of file arrayManipulation.hpp.