38#include <gtest/gtest.h>
70 for (
size_t i = 0; i < arr.
size(); ++i)
106 for (
size_t i = 0; i < arr.
size(); ++i)
107 arr.
access(i) =
static_cast<int>(i * 2);
108 for (
size_t i = 0; i < arr.
size(); ++i)
115 for (
int i = 0; i < 6; ++i)
124 const auto &
carr = arr;
166 for (
int i = 0; i < 5; ++i)
void adjust(const size_t dim)
Set a new dimension.
void cut(const size_t new_dim=0)
Cut the array to a new dimension; that is, it reduces the dimension of array and frees the remaining ...
void remove(T &item)
Given a valid reference to an item in the array, it removes it and decrease the dimension.
T & insert(const T &item)
T & get_last() const
Return a modifiable reference to the last item of array (as if this was a queue)
T & get_first() const
Return a modifiable reference to the first item of array (as if this was a queue)
void set_default_initial_value(const T &value) noexcept
Set the default value.
T & touch(const size_t i)
Touch the entry i.
size_t size() const noexcept
Return the current dimension of array.
T pop()
Remove the last item of array (as if this was a stack)
T & access(const size_t i) const noexcept
Fast access without checking allocation and bound_min_clock checking.
T & top() const
Return a modifiable reference to the last item of stack.
T & append()
Allocate a new entry to the end of array.
bool is_empty() const noexcept
Return true if the array is empty.
void empty() noexcept
Empty the array.
void reserve(const size_t l, const size_t r)
Allocate a range of entries.
auto get_it() const
Return a properly initialized iterator positioned at the first item on the container.
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Lazy and scalable dynamic array implementation.