165 requires(std::is_copy_constructible_v<T>
and std::is_copy_assignable_v<T>)
168 for (
size_t i = 0; i < n; ++i)
205 requires(std::is_copy_constructible_v<T>
and std::is_copy_assignable_v<T>)
221 requires(std::is_copy_constructible_v<T>
and std::is_copy_assignable_v<T>)
251 requires std::is_copy_assignable_v<T>
253 return array.put(data);
264 return array.put(std::forward<T>(data));
288 return array.push(data);
300 return array.push(std::forward<T>(data));
329 return *
array.get_ptr();
335 return *
array.get_ptr();
361 return array.size() == 0;
373 return array.capacity();
380 return array.first();
387 return array.first();
406 return array.remove_last();
411 return array.remove_first();
466 for (
size_t i = 0; i < n; ++i)
523 requires std::predicate<Op &, T &>
526 return array.traverse(op);
542 requires std::predicate<Op &, const T &>
545 for (
size_t i = 0; i <
size(); ++i)
546 if (
not op((*
this)[i]))
566 requires std::predicate<Op &, T &>
585 requires std::predicate<Op &, const T &>
593 return array.is_valid();
623template <
typename T,
typename...
Args>
629template <
class Container>
632 std::vector<typename Container::Item_Type>
ret(c.size());
633 for (
size_t i = 0; i < c.size(); ++i)
Variadic constructor macros for containers.
#define Args_Ctor(Name, Type)
Container traversal and functional operation mixins.
#define ah_underflow_error_if(C)
Throws std::underflow_error if condition holds.
#define Special_Ctors(Set_Type, Type)
Generates special constructors for containers.
Core header for the Aleph-w library.
size_t size_t int32_t value
Simple dynamic array with automatic resizing and functional operations.
Array rev() const
Alias for reverse() const.
bool traverse(Op &&op) const
Traverse const elements with a temporary operation.
static Array create(size_t n)
Create an array with n logical elements.
constexpr size_t size() const noexcept
Return the number of elements stored in the stack.
void empty() noexcept
Empties the container.
void clear() noexcept
Empties the container.
T & append(T &&data)
Append data
constexpr bool is_empty() const noexcept
Checks if the container is empty.
Array(size_t dim=32)
The type of key.
T & base()
Return a reference to the first element of array.
Array(size_t n, const T &value)
Construct an array with n copies of value.
T Key_Type
The type of element.
T & insert(const T &data)
insert a copy of data at the beginning of the array.
Array & rev()
Reverse this array in place.
Array(Array &&s) noexcept
Move constructor.
void swap(Array &s) noexcept
Swap this with s
Array & reverse_in_place()
Alias for reverse().
bool traverse(Op &op) const
Traverse const elements from first to last.
Array append(const Array &a) const
bool traverse(Op &op)
Traverse mutable elements from first to last.
bool traverse(Op &&op)
Traverse mutable elements with a temporary operation.
Array & append(const Array &a)
const T & get_first() const noexcept
return a constant reference to the first element.
T & insert(T &&data)
insert a copy of data at the beginning of the array.
T & operator[](size_t i)
Return a reference to the ith element.
T & get_first() noexcept
return a modifiable reference to the first element.
constexpr T & operator()(const size_t i) noexcept
Return a reference to the ith element. It does not perform bound_statics checks.
Array(const Array &s)
Copy constructor.
Array & reverse()
Reverse the order of items in this array, in place.
bool is_valid() const noexcept
Array & operator=(const Array &s)
Assign by copy s to this
const T & get_last() const noexcept
return a constant reference to the last element.
T & append(const T &data)
Append a copy of data
T & get_last() noexcept
return a modifiable reference to the last element.
constexpr size_t capacity() const noexcept
Return the internal capacity.
Array reverse() const
Return a copy of this array with its items reversed.
void reserve(size_t cap)
Reserves cap cells into the array.
void putn(const size_t n)
Reserve n additional logical slots in the array without value-initializing them.
Array to_array() const
Copy to Aleph::Array (requires copyable elements).
Simple, scalable and fast dynamic array.
Mixin providing equality comparison for sequence containers.
Common methods to the Aleph-w ( ) containers.
and
Conditional mapping of the elements of the container.
Common sequential searching methods on containers.
Mixin that adds STL begin()/end() and cbegin()/cend() to Aleph containers.
__gmp_expr< typename __gmp_resolve_expr< T, V >::value_type, __gmp_binary_expr< __gmp_expr< T, U >, __gmp_expr< V, W >, __gmp_dim_function > > dim(const __gmp_expr< T, U > &expr1, const __gmp_expr< V, W > &expr2)
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Singly linked list implementations with head-tail access.
Main namespace for Aleph-w library functions.
std::decay_t< typename HeadC::Item_Type > T
std::vector< typename Container::Item_Type > to_stdvector(const Container &c)
Array< T > build_array(Args... args)
Iterator on the items of an array.
Iterator(const Array< T > &s) noexcept
Initialize an iterator on array s
typename MemArray< T >::Iterator Base
Simple iterator on elements of array.
Generic list of items stored in a container.
Dynamic doubly linked list implementation.
Simple, scalable, contiguous dynamic array.