|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Simple, scalable and fast dynamic array. More...
#include <tpl_memArray.H>
Inherited by Aleph::ArrayQueue< int >, Aleph::ArrayQueue< Aleph::DynList< int > >, and Aleph::ArrayQueue< T >.
Classes | |
| struct | Iterator |
| Simple iterator on elements of array. More... | |
Public Types | |
| using | Item_Type = T |
Public Member Functions | |
| T * | get_ptr () const noexcept |
| Return the current base of array. | |
| const size_t & | get_dim () const noexcept |
| Return the current dimension of array. | |
| constexpr size_t | capacity () const noexcept |
| The type of element of array. | |
| size_t | size () const noexcept |
| Return the number of elements. | |
| bool | is_empty () const noexcept |
Return true is the array is empty. | |
| MemArray (size_t _dim=Min_Dim) | |
Construct an array con capacity equal or greater than _dim. | |
| ~MemArray () | |
| void | swap (MemArray &a) noexcept |
Swap in constant time this with a | |
| MemArray (const MemArray &a) | |
Construct a copy of a | |
| MemArray (MemArray &&a) noexcept | |
Construct an array moved of rvalue a | |
| MemArray & | operator= (const MemArray &a) |
Assign by copy a to this | |
| MemArray & | operator= (MemArray &&a) noexcept |
Assign by moving a to this | |
| void | empty () noexcept |
| Empties the container. | |
| void | clear () noexcept |
| Alias for empty(). | |
| void | empty_and_release () |
| Empty the array and release all memory. | |
| T & | put (const T &item) |
Put a copy of item at the end of sequence. | |
| T & | put (T &&item) |
Move item at the end of sequence. | |
| T & | push (const T &item) |
Push a copy of item at the beginning of sequence. | |
| T & | push (T &&item) |
Push a copy of item at the beginning of sequence. | |
| T & | top () const |
| T | remove_first () |
| Remove the first item. Gap is closed. | |
| T | pop () |
| pop() the most recently pushed item | |
| T & | append (const T &item) |
| T & | append (T &&item) |
| T & | insert (const T &item) |
| T & | insert (T &&item) |
| void | putn (const size_t more) |
Reserve more additional logical slots in the array. | |
| MemArray & | append (const MemArray &a) |
| void | reserve (const size_t cap) |
Reserves cap cells into the array. | |
| T | get (const size_t i=1) |
Remove i elements from the end. | |
| T | get_ne (const size_t i=1) noexcept |
| T | remove_last () |
| T & | last () const |
| Return a modifiable reference to the last element. | |
| T & | first () const |
| Return a modifiable reference to the first element. | |
| T & | get_first () const |
| T & | get_last () const |
| MemArray & | reverse () |
| Reverse the order of items in array. | |
| T & | access (const size_t i) const noexcept |
| Return a modifiable reference to the ith element. | |
| T & | operator[] (const size_t i) const |
| Return a reference to the ith element. | |
| T & | operator() (const size_t i) const noexcept |
| template<class Operation > | |
| bool | traverse (Operation &operation) |
Traverse all the elements from index 0 to n - 1 and execute operation on each on them. | |
| template<class Operation > | |
| bool | traverse (Operation &operation) const |
| template<class Operation > | |
| bool | traverse (Operation &&operation) const |
| template<class Operation > | |
| bool | traverse (Operation &&operation) |
| bool | is_valid () const noexcept |
Public Attributes | |
| size_t | contract_threshold |
Static Public Attributes | |
| static constexpr size_t | Min_Dim = 4 |
Protected Member Functions | |
| void | allocate () |
| Allocate memory for the current dimension. | |
| bool | expand (const size_t first=0) |
| Test is array is full and if affrimative, then expand the array twice as long and copy the content by swapping. | |
| bool | contract (const size_t first=0) |
Test if n is lesser than contract_threshold and eventually contract the array half long and copies its content. | |
| void | init_dim (size_t d) |
Initialize the dimension of the array to d or to the next two power if d is not a two power. | |
Static Protected Member Functions | |
| static size_t | next_power_of_two (const size_t requested) |
Protected Attributes | |
| T * | ptr = nullptr |
| size_t | dim = Min_Dim |
| size_t | n = 0 |
Private Member Functions | |
| void | open_gap (size_t pos=0, size_t num_entries=1) |
| void | close_gap (size_t pos, size_t num_entries=1) |
Simple, scalable and fast dynamic array.
MemArray implements a totally sequential dynamic array. That is, conditioned to memory availability, the array is stored in a contiguous chunk of memory. So, the access is direct and with exactly the same cost of accessing a normal array.
The array allows inserting and removing elements. These operations are conceived by the ends. The number of stored elements is called n.
The allocation technique obeys to "buddy system"; that is, the exact dimension of array always is an exact two power.
When the array is full, a new chunk twice as long is allocated and the current entries are moved (by move semantic if available).
When the number of entries descends to a contract_threshold the array is half long contracted.
Definition at line 135 of file tpl_memArray.H.
Definition at line 279 of file tpl_memArray.H.
|
inline |
Construct an array con capacity equal or greater than _dim.
| [in] | _dim | proposed dimension of array which could be adjusted to the next two power greater than _dim |
| bad_alloc | if there is not enough memory. |
Definition at line 305 of file tpl_memArray.H.
References Aleph::MemArray< T >::allocate(), Aleph::blossom_maximum_cardinality_matching(), and Aleph::MemArray< T >::init_dim().
|
inline |
Definition at line 313 of file tpl_memArray.H.
References Aleph::MemArray< T >::ptr.
Construct a copy of a
Definition at line 332 of file tpl_memArray.H.
References Aleph::MemArray< T >::allocate(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Construct an array moved of rvalue a
Definition at line 342 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::MemArray< T >::swap().
|
inlinenoexcept |
Return a modifiable reference to the ith element.
No bound_statics check is performed
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 680 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::MemArray< T >::ptr.
Referenced by Aleph::ArrayQueue< T >::complete_put(), Aleph::ArrayQueue< T >::front(), Aleph::ArrayQueue< T >::get(), Aleph::ArrayQueue< T >::getn(), Aleph::ArrayQueue< T >::put(), Aleph::ArrayQueue< T >::put(), Aleph::ArrayQueue< T >::rear_item(), and Aleph::ArrayQueue< T >::traverse().
|
inlineprotected |
Allocate memory for the current dimension.
Definition at line 174 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::contract_threshold, Aleph::MemArray< T >::dim, Aleph::is_power_of_2(), and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::MemArray(), Aleph::MemArray< T >::MemArray(), and Aleph::MemArray< T >::empty_and_release().
Definition at line 571 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::n, Aleph::MemArray< T >::ptr, Aleph::MemArray< T >::putn(), and Aleph::MemArray< T >::size().
Definition at line 501 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::ptr, and Aleph::MemArray< T >::put().
Referenced by MemArray_with_30_items::MemArray_with_30_items().
Definition at line 509 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::ptr, and Aleph::MemArray< T >::put().
|
inlineconstexprnoexcept |
The type of element of array.
Return the capacity of array (its dimension)
Definition at line 282 of file tpl_memArray.H.
References Aleph::MemArray< T >::dim.
Referenced by Aleph::FlatMap< Key, T, Compare >::capacity(), Aleph::FlatSet< Key, Compare >::capacity(), Aleph::FlatMap< Key, T, Compare >::make_room(), print(), print(), TEST(), TEST(), and TEST_F().
|
inlinenoexcept |
Alias for empty().
| none |
Definition at line 394 of file tpl_memArray.H.
References Aleph::MemArray< T >::empty().
Referenced by Aleph::FlatSet< Key, Compare >::clear().
|
inlineprivate |
Definition at line 445 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::close_gap(), Aleph::MemArray< T >::get(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::remove_first().
Test if n is lesser than contract_threshold and eventually contract the array half long and copies its content.
contract(first) first testes n with contract_threshold. If it is lesser, then a new array half as long is allocated and the n elements from first are copied.
| [in] | first | index of first element |
true if the array is reallocated Definition at line 232 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::contract_threshold, Aleph::MemArray< T >::dim, Aleph::MemArray< T >::first(), Aleph::MemArray< T >::Min_Dim, Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::ArrayQueue< T >::get(), Aleph::MemArray< T >::get(), Aleph::MemArray< T >::get_ne(), and Aleph::ArrayQueue< T >::getn().
|
inlinenoexcept |
Empties the container.
The array size is set to zero, but the allocated memory is not released.
| none |
Definition at line 384 of file tpl_memArray.H.
References Aleph::MemArray< T >::n.
Referenced by Aleph::MemArray< T >::clear(), Aleph::FlatMap< Key, T, Compare >::empty(), and Aleph::FlatSet< Key, Compare >::empty().
|
inline |
Empty the array and release all memory.
Definition at line 400 of file tpl_memArray.H.
References Aleph::MemArray< T >::allocate(), Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::dim, Aleph::MemArray< T >::Min_Dim, Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Test is array is full and if affrimative, then expand the array twice as long and copy the content by swapping.
This method first allocates a chunck of 2*dim and then copies from first index the n contained entries to the new chunck.
| [in] | first | index where is found the first item of array |
true if the array was full and then a new twice as long was allocated | bad_alloc | if there is no enough memory |
Definition at line 192 of file tpl_memArray.H.
References ah_overflow_error_if, Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::contract_threshold, Aleph::MemArray< T >::dim, Aleph::MemArray< T >::first(), Aleph::is_power_of_2(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::ArrayQueue< T >::put(), Aleph::MemArray< T >::put(), Aleph::ArrayQueue< T >::put(), Aleph::MemArray< T >::put(), and Aleph::ArrayQueue< T >::putn().
|
inline |
Return a modifiable reference to the first element.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 649 of file tpl_memArray.H.
References ah_underflow_error_if, Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::contract(), Aleph::MemArray< T >::expand(), and Aleph::MemArray< T >::get_first().
|
inline |
Remove i elements from the end.
Return the value of the last removed element
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 608 of file tpl_memArray.H.
References ah_underflow_error_if, Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::contract(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::close_gap(), main(), Aleph::FlatMap< Key, T, Compare >::remove_at(), Aleph::FlatSet< Key, Compare >::remove_at(), Aleph::MemArray< T >::remove_last(), Aleph::FlatMap< Key, T, Compare >::sort_and_unique(), and Aleph::FlatSet< Key, Compare >::sort_and_unique().
|
inlinenoexcept |
Return the current dimension of array.
Definition at line 155 of file tpl_memArray.H.
References Aleph::MemArray< T >::dim.
|
inline |
Definition at line 656 of file tpl_memArray.H.
References Aleph::MemArray< T >::first().
|
inline |
Definition at line 662 of file tpl_memArray.H.
References Aleph::MemArray< T >::last().
Definition at line 622 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::contract(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
|
inlinenoexcept |
Return the current base of array.
Definition at line 149 of file tpl_memArray.H.
References Aleph::MemArray< T >::ptr.
Referenced by Aleph::FlatMap< Key, T, Compare >::begin(), Aleph::FlatSet< Key, Compare >::begin(), Aleph::FlatMap< Key, T, Compare >::begin(), Aleph::FlatSet< Key, Compare >::data(), Aleph::FlatMap< Key, T, Compare >::end(), Aleph::FlatSet< Key, Compare >::end(), Aleph::FlatMap< Key, T, Compare >::end(), Aleph::FlatMap< Key, T, Compare >::erase(), Aleph::FlatSet< Key, Compare >::insert(), Aleph::FlatMap< Key, T, Compare >::insert(), Aleph::FlatSet< Key, Compare >::insert(), Aleph::FlatMap< Key, T, Compare >::insert(), Aleph::FlatMap< Key, T, Compare >::insert_or_assign(), Aleph::FlatMap< Key, T, Compare >::insert_or_assign(), Aleph::FlatMap< Key, T, Compare >::keys(), Aleph::FlatMap< Key, T, Compare >::keys_data(), Aleph::FlatMap< Key, T, Compare >::make_room(), Aleph::FlatSet< Key, Compare >::make_room(), Aleph::FlatMap< Key, T, Compare >::operator==(), Aleph::FlatMap< Key, T, Compare >::operator[](), Aleph::FlatMap< Key, T, Compare >::operator[](), Aleph::FlatMap< Key, T, Compare >::remove_at(), Aleph::FlatSet< Key, Compare >::remove_at(), Aleph::FlatMap< Key, T, Compare >::sort_and_unique(), Aleph::FlatSet< Key, Compare >::sort_and_unique(), TEST_F(), Aleph::FlatMap< Key, T, Compare >::traverse(), Aleph::FlatMap< Key, T, Compare >::traverse(), and Aleph::FlatSet< Key, Compare >::traverse().
|
inlineprotected |
Initialize the dimension of the array to d or to the next two power if d is not a two power.
If d is 0 then d is set to Min_Dim.
| [in] | d | the proposed dimension of array |
Definition at line 267 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::dim, Aleph::is_power_of_2(), Aleph::MemArray< T >::Min_Dim, and Aleph::MemArray< T >::next_power_of_two().
Referenced by Aleph::MemArray< T >::MemArray().
Definition at line 516 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::ptr, and Aleph::MemArray< T >::push().
Definition at line 524 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::ptr, and Aleph::MemArray< T >::push().
|
inlinenoexcept |
Return true is the array is empty.
Definition at line 294 of file tpl_memArray.H.
References Aleph::MemArray< T >::n.
Referenced by Aleph::FlatMap< Key, T, Compare >::is_empty(), Aleph::FlatSet< Key, Compare >::is_empty(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST_F().
|
inlinenoexcept |
Definition at line 743 of file tpl_memArray.H.
References Aleph::MemArray< T >::ptr.
|
inline |
Return a modifiable reference to the last element.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 642 of file tpl_memArray.H.
References ah_underflow_error_if, Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::get_last().
|
inlinestaticprotected |
Definition at line 161 of file tpl_memArray.H.
References ah_overflow_error_if, and Aleph::blossom_maximum_cardinality_matching().
Referenced by Aleph::MemArray< T >::init_dim(), and Aleph::MemArray< T >::reserve().
|
inlineprivate |
Definition at line 439 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::n, Aleph::open_gap(), Aleph::MemArray< T >::ptr, and Aleph::MemArray< T >::putn().
Referenced by Aleph::MemArray< T >::push(), and Aleph::MemArray< T >::push().
|
inlinenoexcept |
Definition at line 697 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::dim, and Aleph::MemArray< T >::ptr.
|
inline |
Assign by copy a to this
Definition at line 349 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::contract_threshold, Aleph::MemArray< T >::dim, Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
|
inlinenoexcept |
Assign by moving a to this
Definition at line 372 of file tpl_memArray.H.
References Aleph::MemArray< T >::swap().
|
inline |
Return a reference to the ith element.
Throws out_of_range if i is out of range
Definition at line 688 of file tpl_memArray.H.
References ah_out_of_range_error_if, Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
|
inline |
pop() the most recently pushed item
Definition at line 495 of file tpl_memArray.H.
References Aleph::MemArray< T >::remove_first().
Push a copy of item at the beginning of sequence.
The array expands if this is already full
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 454 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::open_gap(), and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::insert(), and Aleph::MemArray< T >::insert().
|
inline |
Push a copy of item at the beginning of sequence.
The array expands if this is already full
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 467 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::open_gap(), and Aleph::MemArray< T >::ptr.
Put a copy of item at the end of sequence.
The array expands if this is already full
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 415 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::expand(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::FlatMap< Key, T, Compare >::FlatMap(), Aleph::FlatSet< Key, Compare >::FlatSet(), Aleph::MemArray< T >::append(), Aleph::MemArray< T >::append(), and main().
|
inline |
Move item at the end of sequence.
The array expands if this is already full
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 428 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::expand(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Reserve more additional logical slots in the array.
putn(more) only adjusts the logical size and grows the backing storage if necessary; it does not value-initialize the new entries. Callers must assign to the returned positions before reading them.
| [in] | more | number of cells to reserve |
| bad_alloc | if there is no enough memory |
Definition at line 540 of file tpl_memArray.H.
References ah_overflow_error_if, Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::contract_threshold, Aleph::MemArray< T >::dim, Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::append(), Aleph::FlatMap< Key, T, Compare >::make_room(), Aleph::FlatSet< Key, Compare >::make_room(), and Aleph::MemArray< T >::open_gap().
|
inline |
Remove the first item. Gap is closed.
Definition at line 485 of file tpl_memArray.H.
References ah_underflow_error_if, Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::close_gap(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::pop().
|
inline |
Definition at line 636 of file tpl_memArray.H.
References Aleph::MemArray< T >::get().
Reserves cap cells into the array.
| [in] | cap | new dimension |
| bad_alloc | if there is no enough memory |
Definition at line 588 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::contract_threshold, Aleph::MemArray< T >::dim, Aleph::is_power_of_2(), Aleph::MemArray< T >::n, Aleph::MemArray< T >::next_power_of_two(), and Aleph::MemArray< T >::ptr.
Referenced by Aleph::FlatMap< Key, T, Compare >::make_room(), Aleph::FlatMap< Key, T, Compare >::reserve(), and Aleph::FlatSet< Key, Compare >::reserve().
|
inline |
Reverse the order of items in array.
Definition at line 668 of file tpl_memArray.H.
References Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
|
inlinenoexcept |
Return the number of elements.
Definition at line 288 of file tpl_memArray.H.
References Aleph::MemArray< T >::n.
Referenced by Aleph::MemArray< T >::append(), Aleph::FlatSet< Key, Compare >::end(), Aleph::FlatSet< Key, Compare >::get_last(), Aleph::FlatMap< Key, T, Compare >::lower_idx(), Aleph::FlatSet< Key, Compare >::lower_idx(), Aleph::FlatMap< Key, T, Compare >::make_room(), Aleph::FlatSet< Key, Compare >::make_room(), Aleph::FlatMap< Key, T, Compare >::match_at(), Aleph::FlatSet< Key, Compare >::match_at(), print(), print(), Aleph::FlatMap< Key, T, Compare >::remove_at(), Aleph::FlatSet< Key, Compare >::remove_at(), Aleph::FlatMap< Key, T, Compare >::size(), Aleph::FlatSet< Key, Compare >::size(), Aleph::FlatMap< Key, T, Compare >::sort_and_unique(), Aleph::FlatSet< Key, Compare >::sort_and_unique(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), Aleph::FlatSet< Key, Compare >::traverse(), Aleph::FlatMap< Key, T, Compare >::upper_idx(), and Aleph::FlatSet< Key, Compare >::upper_idx().
Swap in constant time this with a
Definition at line 323 of file tpl_memArray.H.
References Aleph::MemArray< T >::contract_threshold, Aleph::MemArray< T >::dim, Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::MemArray(), Aleph::MemArray< T >::operator=(), Aleph::ArrayQueue< T >::swap(), Aleph::FlatMap< Key, T, Compare >::swap(), and Aleph::FlatSet< Key, Compare >::swap().
|
inline |
Definition at line 477 of file tpl_memArray.H.
References ah_underflow_error_if, Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
|
inline |
Definition at line 738 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching().
|
inline |
Definition at line 731 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching().
|
inline |
Traverse all the elements from index 0 to n - 1 and execute operation on each on them.
| [in] | operation | to be performed on each element |
true if operation was executed on all elements; false otherwise.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 712 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::MemArray< T >::n, and Aleph::MemArray< T >::ptr.
Referenced by Aleph::MemArray< T >::traverse().
|
inline |
Definition at line 724 of file tpl_memArray.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::MemArray< T >::traverse().
|
mutable |
Definition at line 146 of file tpl_memArray.H.
Referenced by Aleph::MemArray< T >::allocate(), Aleph::MemArray< T >::contract(), Aleph::MemArray< T >::expand(), Aleph::MemArray< T >::operator=(), Aleph::MemArray< T >::putn(), Aleph::MemArray< T >::reserve(), and Aleph::MemArray< T >::swap().
|
protected |
Definition at line 142 of file tpl_memArray.H.
Referenced by Aleph::MemArray< T >::allocate(), Aleph::MemArray< T >::capacity(), Aleph::MemArray< T >::contract(), Aleph::MemArray< T >::empty_and_release(), Aleph::MemArray< T >::expand(), Aleph::ArrayQueue< T >::front(), Aleph::MemArray< T >::get_dim(), Aleph::ArrayQueue< T >::increase_index(), Aleph::MemArray< T >::init_dim(), Aleph::MemArray< T >::operator()(), Aleph::MemArray< T >::operator=(), Aleph::MemArray< T >::putn(), Aleph::ArrayQueue< T >::putn(), Aleph::ArrayQueue< T >::rear_item(), Aleph::MemArray< T >::reserve(), and Aleph::MemArray< T >::swap().
|
staticconstexpr |
Definition at line 138 of file tpl_memArray.H.
Referenced by Aleph::MemArray< T >::contract(), Aleph::MemArray< T >::empty_and_release(), and Aleph::MemArray< T >::init_dim().
|
protected |
Definition at line 143 of file tpl_memArray.H.
Referenced by Aleph::MemArray< T >::MemArray(), Aleph::MemArray< T >::append(), Aleph::MemArray< T >::close_gap(), Aleph::ArrayQueue< T >::complete_put(), Aleph::MemArray< T >::contract(), Aleph::MemArray< T >::empty(), Aleph::MemArray< T >::empty_and_release(), Aleph::MemArray< T >::expand(), Aleph::MemArray< T >::first(), Aleph::ArrayQueue< T >::front(), Aleph::ArrayQueue< T >::get(), Aleph::MemArray< T >::get(), Aleph::MemArray< T >::get_ne(), Aleph::ArrayQueue< T >::getn(), Aleph::MemArray< T >::is_empty(), Aleph::MemArray< T >::last(), Aleph::MemArray< T >::open_gap(), Aleph::MemArray< T >::operator=(), Aleph::MemArray< T >::operator[](), Aleph::MemArray< T >::put(), Aleph::MemArray< T >::put(), Aleph::MemArray< T >::putn(), Aleph::ArrayQueue< T >::putn(), Aleph::ArrayQueue< T >::rear(), Aleph::ArrayQueue< T >::recenter_indices(), Aleph::MemArray< T >::remove_first(), Aleph::MemArray< T >::reserve(), Aleph::MemArray< T >::reverse(), Aleph::MemArray< T >::size(), Aleph::MemArray< T >::swap(), Aleph::MemArray< T >::top(), Aleph::ArrayQueue< T >::traverse(), and Aleph::MemArray< T >::traverse().
|
protected |
Definition at line 141 of file tpl_memArray.H.
Referenced by Aleph::MemArray< T >::MemArray(), Aleph::MemArray< T >::~MemArray(), Aleph::MemArray< T >::access(), Aleph::MemArray< T >::allocate(), Aleph::MemArray< T >::append(), Aleph::MemArray< T >::append(), Aleph::MemArray< T >::append(), Aleph::MemArray< T >::close_gap(), Aleph::MemArray< T >::contract(), Aleph::MemArray< T >::empty_and_release(), Aleph::MemArray< T >::expand(), Aleph::MemArray< T >::first(), Aleph::MemArray< T >::get(), Aleph::MemArray< T >::get_ne(), Aleph::MemArray< T >::get_ptr(), Aleph::MemArray< T >::insert(), Aleph::MemArray< T >::insert(), Aleph::MemArray< T >::is_valid(), Aleph::MemArray< T >::last(), Aleph::MemArray< T >::open_gap(), Aleph::MemArray< T >::operator()(), Aleph::MemArray< T >::operator=(), Aleph::MemArray< T >::operator[](), Aleph::MemArray< T >::push(), Aleph::MemArray< T >::push(), Aleph::MemArray< T >::put(), Aleph::MemArray< T >::put(), Aleph::MemArray< T >::putn(), Aleph::MemArray< T >::remove_first(), Aleph::MemArray< T >::reserve(), Aleph::MemArray< T >::reverse(), Aleph::MemArray< T >::swap(), Aleph::MemArray< T >::top(), and Aleph::MemArray< T >::traverse().