Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::DynArray< T > Class Template Reference

#include <tpl_dynArray.H>

Inheritance diagram for Aleph::DynArray< T >:
[legend]
Collaboration diagram for Aleph::DynArray< T >:
[legend]

Classes

class  Iterator
 Iterator on the items of array. More...
 
class  Proxy
 

Public Types

using Item_Type = T
 
using Key_Type = T
 The type of element stored in the array.
 
- Public Types inherited from StlAlephIterator< DynArray< T > >
using iterator = StlIterator< DynArray< T > >
 
using const_iterator = StlConstIterator< DynArray< T > >
 

Public Member Functions

size_t get_dir_size () const noexcept
 Return the directory size.
 
size_t get_seg_size () const noexcept
 Return the segment size.
 
size_t get_block_size () const noexcept
 Return the block size.
 
size_t size () const noexcept
 Return the current dimension of array.
 
size_t max_size () const noexcept
 Return the maximum allowed dimension (or the maximum number of elements that could have the array treated as a container).
 
size_t get_num_blocks () const noexcept
 Return the number of blocks consumed by the array.
 
void set_default_initial_value (const T &value) noexcept
 Set the default value.
 
void set_default_initial_value (T &&value=T())
 
 DynArray (const size_t _pow_dir, const size_t _pow_seg, const size_t _pow_block)
 Construct a dynamic array given directory, segment and block sizes.
 
 DynArray (const size_t dim=0)
 Default constructor.
 
template<template< typename > class List>
 DynArray (const List< T > &l)
 
template<class It >
 DynArray (It b, It e)
 
 DynArray (std::initializer_list< T > l)
 
 ~DynArray ()
 
void copy_array (const DynArray< T > &src_array)
 Copy the items of src_array to this
 
 DynArray (const DynArray< T > &array)
 Copy constructor.
 
DynArray< T > & operator= (const DynArray< T > &array)
 Copy assignment.
 
void swap (DynArray< T > &array) noexcept
 Swap in constant time array with this
 
 DynArray (DynArray &&other) noexcept
 Move constructor.
 
DynArrayoperator= (DynArray &&other) noexcept
 Move assignment.
 
Taccess (const size_t i) const noexcept
 Fast access without checking allocation and bound_min_clock checking.
 
Toperator() (const size_t i) const noexcept
 
bool exist (const size_t i) const
 Return true if the i-th entry is accessible.
 
Ttest (const size_t i) const noexcept
 Test if the i-th entry es writable,.
 
Ttouch (const size_t i)
 Touch the entry i.
 
void reserve (const size_t l, const size_t r)
 Allocate a range of entries.
 
void reserve (const size_t dim)
 Assure that the range between 0 and dim is allocated.
 
void cut_ne (const size_t new_dim=0)
 
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 memory.
 
void adjust (const size_t dim)
 Set a new dimension.
 
void empty () noexcept
 Empty the array.
 
Proxy operator[] (const size_t i) const
 
Proxy operator[] (const size_t i)
 
Tappend ()
 Allocate a new entry to the end of array.
 
Tappend (const T &data)
 Copy data to the end of array, increase the dimension and return a modifiable reference to the copied data.
 
Tappend (T &&data)
 Move data to the end of array, increase the dimension and return a modifiable reference to the copied data.
 
Tinsert (const T &item)
 
Tinsert (T &&item)
 
void push (const T &data)
 
Tpush (T &&data)
 
void put (const T &data)
 
Tput (T &&data)
 
void remove (T &item)
 Given a valid reference to an item in the array, it removes it and decrease the dimension.
 
void erase (T &item)
 
bool is_empty () const noexcept
 Return true if the array is empty.
 
DynArrayreverse ()
 Reverse the order of items in array.
 
T pop ()
 Remove the last item of array (as if this was a stack)
 
Ttop () const
 Return a modifiable reference to the last item of stack.
 
Tget_first () const
 Return a modifiable reference to the first item of array (as if this was a queue)
 
Tget_last () const
 Return a modifiable reference to the last item of array (as if this was a queue)
 
Iterator get_it ()
 
Iterator get_it () const
 
Iterator get_it (const size_t pos)
 
Iterator get_it (const size_t pos) const
 
template<class Operation >
bool traverse (Operation &operation) const
 Traverse all the array and execute a conditioned operation must have the signature:
 
template<class Operation >
bool traverse (Operation &operation)
 
template<class Operation >
bool traverse (Operation &&operation) const
 
template<class Operation >
bool traverse (Operation &&operation)
 
- Public Member Functions inherited from LocateFunctions< DynArray< T >, T >
auto get_it () const
 Return a properly initialized iterator positioned at the first item on the container.
 
auto get_it (const size_t pos) const
 Return a properly initialized iterator positioned at the pos item on the container.
 
auto get_itor () const
 Alias of get_it().
 
T & nth_ne (const size_t n) noexcept
 Return the n‑th element without bounds checking.
 
const T & nth_ne (const size_t n) const noexcept
 Const overload of nth_ne(size_t).
 
T & nth (const size_t n)
 Return the n-th item of container.
 
const T & nth (const size_t n) const
 Const overload of nth(size_t).
 
T * find_ptr (Operation &operation) noexcept(operation_is_noexcept< Operation >())
 Find a pointer to an item in the container according to a searching criteria.
 
const T * find_ptr (Operation &operation) const noexcept(operation_is_noexcept< Operation >())
 Const overload of find_ptr(Operation&).
 
const T * find_ptr (Operation &&operation) const noexcept(operation_is_noexcept< Operation >())
 Overload of find_ptr(Operation&) const that accepts rvalues.
 
T * find_ptr (Operation &&operation) noexcept(operation_is_noexcept< Operation >())
 Overload of find_ptr(Operation&) that accepts rvalues.
 
size_t find_index (Operation &operation) const noexcept(operation_is_noexcept< Operation >())
 Find the position of an item in the container according to a searching criteria.
 
size_t find_index (Operation &&operation) const noexcept(operation_is_noexcept< Operation >())
 Overload of find_index(Operation&) that accepts rvalues.
 
std::tuple< bool, T > find_item (Operation &operation) noexcept(operation_is_noexcept< Operation >())
 Safe sequential searching of an item matching a criteria.
 
std::tuple< bool, T > find_item (Operation &operation) const noexcept(operation_is_noexcept< Operation >())
 
std::tuple< bool, T > find_item (Operation &&operation) noexcept(operation_is_noexcept< Operation >())
 
std::tuple< bool, T > find_item (Operation &&operation) const noexcept(operation_is_noexcept< Operation >())
 
- Public Member Functions inherited from FunctionalMethods< DynArray< T >, T >
void emplace (Args &&... args)
 Appends a new element into the container by constructing it in-place with the given args.
 
void emplace_end (Args &&... args)
 
void emplace_ins (Args &&... args)
 Insert a new element into the container by constructing it in-place with the given args.
 
size_t ninsert (Args ... args)
 Insert n variadic items.
 
size_t nappend (Args ... args)
 Append n variadic items.
 
void for_each (Operation &operation)
 Traverse all the container and performs an operation on each element.
 
void for_each (Operation &operation) const
 Const overload of for_each(Operation&).
 
void for_each (Operation &&operation) const
 Overload of for_each(Operation&) const that accepts rvalues.
 
void for_each (Operation &&operation)
 Overload of for_each(Operation&) that accepts rvalues.
 
void each (Operation &operation)
 Alias of for_each(Operation&).
 
void each (Operation &operation) const
 Const alias of for_each(Operation&).
 
void each (Operation &&operation) const
 Const alias of for_each(Operation&) that accepts rvalues.
 
void each (Operation &&operation)
 Alias of for_each(Operation&) that accepts rvalues.
 
void each (size_t pos, const size_t slice, Operation &operation) const
 Traverse the container starting at pos taking one item every slice, performing a mutable operation on each visited element.
 
void each (const size_t pos, const size_t slice, Operation &&operation) const
 
void mutable_for_each (Operation &operation)
 
void mutable_for_each (Operation &&operation)
 
bool all (Operation &operation) const
 Check if all the elements of container satisfy a condition.
 
bool all (Operation &&operation) const
 Overload of all(Operation&) that accepts rvalues.
 
bool exists (Operation &op) const
 Test for existence in the container of an element satisfying a criteria.
 
bool exists (Operation &&op) const
 Overload of exists(Operation&) that accepts rvalues.
 
Aleph::DynList< __T > maps (Operation &op) const
 Map the elements of the container.
 
Aleph::DynList< __T > maps (Operation &&op) const
 Overload of maps(Operation&) that accepts rvalues.
 
Aleph::DynList< __Tmaps_if (Prop prop, Operation &op) const
 Conditional mapping of the elements of the container.
 
Aleph::DynList< __Tmaps_if (Prop prop, Operation &&op) const
 Overload of maps_if(Prop, Operation&) that accepts rvalues.
 
Aleph::DynList< T > to_dynlist () const
 Convert container to DynList.
 
std::vector< T > to_vector () const
 Convert container to std::vector.
 
__T foldl (const __T &init, Op &op) const
 Fold the elements of the container to a specific result.
 
__T foldl (const __T &init, Op &&op=Op()) const
 Overload of foldl(const __T&, Op&) that accepts rvalues.
 
__T fold_left (const __T &init, Op &op) const
 Alias for foldl with the same accumulator type.
 
__T fold_left (const __T &init, Op &&op=Op()) const
 Overload of fold_left(const __T&, Op&) that accepts rvalues.
 
fold (const T &init, Operation &operation) const
 Simplified version of foldl() where the folded type is the same type of elements stored in the container.
 
fold (const T &init, Operation &&operation) const
 Overload of fold(const T&, Operation&) that accepts rvalues.
 
Aleph::DynList< T > filter (Operation &operation) const
 Filter the elements of a container according to a matching criteria.
 
Aleph::DynList< T > filter (Operation &&operation) const
 Overload of filter(Operation&) that accepts rvalues.
 
Aleph::DynList< const T * > ptr_filter (Operation &operation) const
 Filter the elements of a container according to a matching criteria and return a pointer to the matched items in the container.
 
Aleph::DynList< const T * > ptr_filter (Operation &&operation) const
 Overload of ptr_filter(Operation&) that accepts rvalues.
 
Aleph::DynList< std::tuple< T, size_t > > pfilter (Operation &operation) const
 Filter the elements of a container according to a matching criteria and determine its positions respect to the traversal of container.
 
Aleph::DynList< std::tuple< T, size_t > > pfilter (Operation &&operation) const
 Overload of pfilter(Operation&) that accepts rvalues.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > partition (Operation &op) const
 Exclusive partition of container according to a filter criteria.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > partition (Operation &&op) const
 Overload of partition(Operation&) that accepts rvalues.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > partition (size_t n) const
 Exclusive partition of container in the nth item.
 
std::pair< Aleph::DynList< T >, Aleph::DynList< T > > split_half () const
 Split the container into two halves by alternating elements.
 
std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > tpartition (Operation &op) const
 Exclusive partition of container according to a filter criteria.
 
std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > tpartition (Operation &&op) const
 Overload of tpartition(Operation&) that accepts rvalues.
 
size_t length () const noexcept
 Count the number of elements of a container.
 
Aleph::DynList< T > rev () const
 Return a list with the elements of container in reverse order respect to its traversal order.
 
Aleph::DynList< T > take (const size_t n) const
 Return a list with the first n elements seen in the container during its traversal.
 
Aleph::DynList< T > take (size_t i, const size_t j, const size_t step=1) const
 Return a list with elements seen in the container between i and j position respect to its traversal.
 
Aleph::DynList< T > drop (const size_t n) const
 Drop the first n elements seen in the container during its traversal.
 
void mutable_drop (const size_t n)
 Drop the first n elements seen from container.
 
- Public Member Functions inherited from GenericItems< Container, T >
Aleph::DynList< T > items () const
 Return a list of all the elements of a container sorted by traversal order.
 
Aleph::DynList< T > keys () const
 
- Public Member Functions inherited from EqualToMethod< DynArray< T > >
bool equal_to (const DynArray< T > &r) const noexcept
 Test if elements of this are exactly contained in another container.
 
bool operator== (const DynArray< T > &r) const noexcept
 
bool operator!= (const DynArray< T > &r) const noexcept
 Negation of equal_to()
 
- Public Member Functions inherited from StlAlephIterator< DynArray< T > >
iterator begin () noexcept
 Return an STL-compatible iterator to the first element.
 
const_iterator begin () const noexcept
 Return a const iterator to the first element.
 
iterator end () noexcept
 Return an STL-compatible end iterator.
 
const_iterator end () const noexcept
 Return a const end iterator.
 
const_iterator cbegin () const noexcept
 Return a const iterator to the first element.
 
const_iterator cend () const noexcept
 Return a const end iterator.
 

Static Public Member Functions

static void compute_sizes (const size_t n, size_t &d, size_t &s, size_t &b) noexcept
 Given a dimension n, it proposes values for the directory, segment and block sizes.
 
static std::tuple< size_t, size_t, size_tcompute_sizes (const size_t n) noexcept
 Given a dimension n, it proposes values for the directory, segment and block sizes.
 

Static Public Attributes

static const size_t Default_Pow_Dir = 6
 The type of element stored in the array.
 
static const size_t Default_Pow_Seg = 8
 Default two power for directory size.
 
static const size_t Default_Pow_Block = 12
 Default two power for segment size.
 
static const unsigned long long Max_Dim_Allowed
 Maximum dimension allowed.
 

Private Member Functions

size_t index_in_dir (const size_t i) const noexcept
 
size_t modulus_from_index_in_dir (const size_t i) const noexcept
 
size_t index_in_seg (const size_t &i) const noexcept
 
size_t index_in_block (const size_t i) const noexcept
 
void fill_dir_to_null () noexcept
 
void fill_seg_to_null (T **seg) noexcept
 
void allocate_dir ()
 
void resize_dir (const size_t i)
 
void allocate_segment (T **&seg)
 
void allocate_block (T *&block)
 
void release_segment (T **&seg) noexcept
 
void release_block (T *&block) noexcept
 
void release_blocks_and_segment (T **&seg) noexcept
 
void ensure_not_empty (const char *context) const
 
void release_all_segments_and_blocks () noexcept
 
void release_dir () noexcept
 
size_t divide_by_block_size (const size_t number) const noexcept
 
size_t modulus_by_block_size (const size_t number) const noexcept
 
void advance_block_index (size_t block_index, size_t seg_index, const size_t len) const noexcept
 
void allocate_block (T *&block, T *src_block)
 
void allocate_segment (T **&seg, T **src_seg)
 
void allocate_dir (T ***src_dir)
 
template<class Operation >
bool __traverse (Operation &operation)
 

Static Private Member Functions

static size_t two_raised (const size_t n) noexcept
 
static size_t compute_dim (size_t d, size_t s, size_t b) noexcept
 
static size_t next2Pow (const size_t number) noexcept
 

Private Attributes

size_t pow_dir = Default_Pow_Dir
 
size_t pow_seg = Default_Pow_Seg
 
size_t pow_block
 
size_t seg_plus_block_pow = pow_seg + pow_block
 
size_t mask_seg_plus_block = two_raised(seg_plus_block_pow) - 1
 
size_t dir_size = two_raised(pow_dir)
 
size_t seg_size = two_raised(pow_seg)
 
size_t block_size = two_raised(pow_block)
 
unsigned long long max_dim = two_raised(seg_plus_block_pow + pow_dir)
 
size_t mask_seg = seg_size - 1
 
size_t mask_block = block_size - 1
 
size_t current_dim
 
size_t num_segs = 0
 
size_t num_blocks = 0
 
T *** dir = nullptr
 
T default_initial_value = T()
 
Tdefault_initial_value_ptr = &default_initial_value
 

Static Private Attributes

static const size_t Max_Bits_Allowed = 8 * sizeof(size_t)
 Default two power for block size.
 
static const size_t Max_Pow_Block
 

Friends

class BitArray
 

Additional Inherited Members

Detailed Description

template<typename T>
class Aleph::DynArray< T >

Lazy and scalable dynamic array

This class implements a very versatile dynamic array which would represent a good trade-off between fast and constant access time and memory consumption. The array is lazy in the sense that the dimension grows dynamically and the required memory for a cell could be allocated at the first writing.

The data structure consists of three array types. A first array type is called block, and it is a contiguous chunk of block_size data entries. if an array occupies n entries then there are n/block_size + 1 blocks allocated. The blocks are indexed by segments of seg_size blocks which in turn are indexed by a directory of dir_size segment. For accessing to entry i the following calculations are done:

  1. The directory entry corresponds to i/(seg_size*block_size).
  2. The modulus of previous operation is divided between block_size. This gives the index in the segment.
  3. Finally, the modulus of previous operation gives the index of i-th in the block.

So, there are always four operations for each access what gives a constant access time.

In order to faster perform the calculations, the directory, segment and block size are adjusted to two powers. In this way, the division and modulus can be done with shifting and masking.

Access through [] operator

For lazy writing, that is to allocate the block just when it is certain that this will be used, the operator [] is used. This operator is able to determine whether the i-th entry has been o not written. If for example a reading on a non allocated block is done, some such as:

std::cout << a[i] << end;

Then a default initialization value will be returned. This value corresponds to the resulting of default constructor call.

At the contrary, if the first time that a writing is done, some such as:

a[i] = value;

Then the block, and eventually the segment will be allocated.

Eventually the array could be fragmented and to consume memory some proportional to the writes done. Suppose for example that you only perform:

a[0] = value;
a[100000000] = value;

In this case, the registered dimension of array will be 100000000, but only two blocks will be allocated. If you only performs reads between \((0, 100000000)\) always it will be returned the default value and the majority of times neither the segment nor the block will be read, since they have not been written.

Access through [] operator perform bound_min_clock checks and it requires to test if the segment and/or block have been allocated and eventually to allocate them.

Faster access though [] operator

If you know (you are absolutely sure of) that the entry has already been written, and consequently it has already its block allocated, then you could use the operator () for direct access.

Access with () operator does not perform any check (bounds and blocks and segment existence). This way is faster but unsure.

() operator is an alias of access(i) method.

In order to assure that a range of entries is already allocated, you could use reserve(l, r) method, which test and eventually allocates the needed memory for the entries comprised in the range \([l,r]\).

Managing a dynamic array as a list

From a functional perspective, an dynamic array could be treated as a list.

Initially, the array is empty.

A new item can be inserted with append(item. This method copy (or moves) the item to the next available entry (at the end). The dimension is increased in one unit.

You can also to treat the dynamic array as stack or queue.

Setting the directory, segment and block sizes

The interface offer a default constructor which normally sets the sizes and serves for almost all situations.

However, sometimes is desirable to set oneself these parameter. The principal justification is given for situations where the memory is very limited.

Note that a memory manager could have enough memory dispersed through the total of available chunks, but it could not exist a contiguous block of a given size. The more large is the block size, the higher is the probability for failing to allocate. So, there are circumstances where you could be interested in setting a small block size, to facilitate the block's allocation.

Of course, these settings restrict the maximum dimension, which eventually could be composed with a larger directory. As example, consider a directory of 1024 segments of 512 blocks of 4096 entries. This gives a total of

\(1024 \times 512 \times 4096 = 2147483648\) entries.

Now suppose that you think that 4096 is too much for a block, then you could set the block to 128 and displace the difference to the directory. This gives sizes of 32768, 512 and 128 respectively and thus to obtain the same maximum capacity.

You could think that failure probability is displaced to the directory allocation, but the directory is allocated once at construction time.

Definition at line 200 of file tpl_dynArray.H.

Member Typedef Documentation

◆ Item_Type

Definition at line 210 of file tpl_dynArray.H.

◆ Key_Type

template<typename T >
using Aleph::DynArray< T >::Key_Type = T

The type of element stored in the array.

Definition at line 211 of file tpl_dynArray.H.

Constructor & Destructor Documentation

◆ DynArray() [1/7]

template<typename T >
Aleph::DynArray< T >::DynArray ( const size_t  _pow_dir,
const size_t  _pow_seg,
const size_t  _pow_block 
)
inline

Construct a dynamic array given directory, segment and block sizes.

Parameters
[in]_pow_dirtwo power for directory size
[in]_pow_segtwo power for segment size
[in]_pow_blocktwo power for block size
Exceptions
bad_allocif there is no enough memory
length_errorif the given sizes exceed the maximum possible dimension
overflow_errorif it happens an arithmetic overflow with the bits operations

Definition at line 722 of file tpl_dynArray.H.

References ah_length_error_if, Aleph::DynArray< T >::allocate_dir(), FunctionalMethods< DynArray< T >, T >::maps(), Aleph::DynArray< T >::max_dim, and Aleph::DynArray< T >::Max_Dim_Allowed.

◆ DynArray() [2/7]

template<typename T >
Aleph::DynArray< T >::DynArray ( const size_t  dim = 0)
inline

Default constructor.

Parameters
[in]diminitial dimension of array
Exceptions
bad_allocif there is no enough memory
length_errorsi dim is greater than maximum allowed
overflow_errorif it happens an arithmetic overflow with the bits operations

Definition at line 757 of file tpl_dynArray.H.

References ah_length_error_if, Aleph::DynArray< T >::allocate_dir(), FunctionalMethods< DynArray< T >, T >::maps(), Aleph::DynArray< T >::max_dim, and Aleph::DynArray< T >::Max_Dim_Allowed.

◆ DynArray() [3/7]

template<typename T >
template<template< typename > class List>
Aleph::DynArray< T >::DynArray ( const List< T > &  l)
inline

Definition at line 772 of file tpl_dynArray.H.

◆ DynArray() [4/7]

template<typename T >
template<class It >
Aleph::DynArray< T >::DynArray ( It  b,
It  e 
)
inline

Definition at line 772 of file tpl_dynArray.H.

◆ DynArray() [5/7]

template<typename T >
Aleph::DynArray< T >::DynArray ( std::initializer_list< T l)
inline

Definition at line 772 of file tpl_dynArray.H.

◆ ~DynArray()

template<typename T >
Aleph::DynArray< T >::~DynArray ( )
inline

Definition at line 774 of file tpl_dynArray.H.

References Aleph::DynArray< T >::release_dir().

◆ DynArray() [6/7]

template<typename T >
Aleph::DynArray< T >::DynArray ( const DynArray< T > &  array)
inline

Copy constructor.

Parameters
[in]arraysource of copy
Exceptions
bad_allocif there is no enough memory

Definition at line 795 of file tpl_dynArray.H.

References Aleph::DynArray< T >::allocate_dir(), Aleph::DynArray< T >::copy_array(), and Aleph::DynArray< T >::dir.

◆ DynArray() [7/7]

Member Function Documentation

◆ __traverse()

◆ access()

template<typename T >
Aleph::DynArray< T >::access ( const size_t  i) const
inlinenoexcept

Fast access without checking allocation and bound_min_clock checking.

The purpose of this method is to access the i-th entry in the fastest possible way. For that, no checks are done.

  @param[in] i index of entry to be accessed
  @see exist

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 904 of file tpl_dynArray.H.

References Aleph::DynArray< T >::dir, Aleph::DynArray< T >::index_in_block(), Aleph::DynArray< T >::index_in_dir(), Aleph::DynArray< T >::index_in_seg(), and FunctionalMethods< DynArray< T >, T >::maps().

Referenced by Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::Abstract_Euclidian_Plane(), Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::Floyd_All_Shortest_Paths(), Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::add_point(), Aleph::Compute_Cut_Nodes< GT, SA >::compute_blocks(), Aleph::Random_Digraph< GT, Init_Node, Init_Arc >::connect(), Aleph::DynArray_Set< T, Equal >::count(), Aleph::DynArray< T >::Iterator::get_curr_ne(), Aleph::DynArray< T >::insert(), Aleph::DynArray< T >::insert(), Aleph::kosaraju_connected_components(), Aleph::DynArray< T >::operator()(), Aleph::Matrix_Graph< GT, SA >::operator()(), Aleph::Matrix_Graph< GT, SA >::operator()(), Aleph::Ady_Mat< GT, __Entry_Type, SA >::operator()(), Aleph::DynArray< T >::pop(), Aleph::matgraph_detail::read_matrix(), Aleph::DynArray< T >::remove(), Aleph::DynArray_Set< T, Equal >::remove_all(), Aleph::DynArray_Set< T, Equal >::search(), TEST(), and Aleph::Xml_Graph< GT, Node_Reader, Arc_Reader, Node_Writer, Arc_Writer >::write_graph().

◆ adjust()

template<typename T >
void Aleph::DynArray< T >::adjust ( const size_t  dim)
inline

Set a new dimension.

If dimension is greater than the current, then more memory is allocated; otherwise the remaining memory is freed. In both cases, the current dimension is adjusted.

Parameters
[in]dimnew dimension value

Definition at line 1179 of file tpl_dynArray.H.

References Aleph::DynArray< T >::current_dim, Aleph::DynArray< T >::cut(), dim(), and Aleph::DynArray< T >::reserve().

◆ advance_block_index()

template<typename T >
void Aleph::DynArray< T >::advance_block_index ( size_t  block_index,
size_t  seg_index,
const size_t  len 
) const
inlineprivatenoexcept

◆ allocate_block() [1/2]

◆ allocate_block() [2/2]

template<typename T >
void Aleph::DynArray< T >::allocate_block ( T *&  block,
T src_block 
)
inlineprivate

◆ allocate_dir() [1/2]

◆ allocate_dir() [2/2]

◆ allocate_segment() [1/2]

◆ allocate_segment() [2/2]

template<typename T >
void Aleph::DynArray< T >::allocate_segment ( T **&  seg,
T **  src_seg 
)
inlineprivate

◆ append() [1/3]

◆ append() [2/3]

template<typename T >
Aleph::DynArray< T >::append ( const T data)
inline

Copy data to the end of array, increase the dimension and return a modifiable reference to the copied data.

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 1215 of file tpl_dynArray.H.

References Aleph::DynArray< T >::append(), and FunctionalMethods< DynArray< T >, T >::maps().

◆ append() [3/3]

template<typename T >
Aleph::DynArray< T >::append ( T &&  data)
inline

Move data to the end of array, increase the dimension and return a modifiable reference to the copied data.

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 1224 of file tpl_dynArray.H.

References Aleph::DynArray< T >::append(), and FunctionalMethods< DynArray< T >, T >::maps().

◆ compute_dim()

template<typename T >
static size_t Aleph::DynArray< T >::compute_dim ( size_t  d,
size_t  s,
size_t  b 
)
inlinestaticprivatenoexcept

◆ compute_sizes() [1/2]

template<typename T >
static std::tuple< size_t, size_t, size_t > Aleph::DynArray< T >::compute_sizes ( const size_t  n)
inlinestaticnoexcept

Given a dimension n, it proposes values for the directory, segment and block sizes.

Parameters
[in]nproposed dimension
Returns
a 3-tuple with the directory, segment and block sizes

Definition at line 289 of file tpl_dynArray.H.

References Aleph::DynArray< T >::compute_sizes().

◆ compute_sizes() [2/2]

template<typename T >
static void Aleph::DynArray< T >::compute_sizes ( const size_t  n,
size_t d,
size_t s,
size_t b 
)
inlinestaticnoexcept

Given a dimension n, it proposes values for the directory, segment and block sizes.

Parameters
[in]nproposed dimension
[out]ddirectory size
[out]ssegment size
[out]bblock size

Definition at line 261 of file tpl_dynArray.H.

References Aleph::DynArray< T >::compute_dim(), Aleph::DynArray< T >::Default_Pow_Block, Aleph::DynArray< T >::Default_Pow_Dir, and Aleph::DynArray< T >::Default_Pow_Seg.

Referenced by Aleph::DynArray< T >::compute_sizes(), and Aleph::DynMatrix< T >::set_dimension().

◆ copy_array()

template<typename T >
void Aleph::DynArray< T >::copy_array ( const DynArray< T > &  src_array)
inline

Copy the items of src_array to this

Parameters
[in]src_arraysource array

Definition at line 783 of file tpl_dynArray.H.

References FunctionalMethods< DynArray< T >, T >::maps().

Referenced by Aleph::DynArray< T >::DynArray(), and Aleph::DynArray< T >::operator=().

◆ cut()

◆ cut_ne()

◆ divide_by_block_size()

template<typename T >
size_t Aleph::DynArray< T >::divide_by_block_size ( const size_t  number) const
inlineprivatenoexcept

◆ empty()

template<typename T >
void Aleph::DynArray< T >::empty ( )
inlinenoexcept

Empty the array.

All the occupied memory is freed and the dimension is to set to zero

Definition at line 1189 of file tpl_dynArray.H.

References Aleph::DynArray< T >::cut().

Referenced by DataGenerator::few_unique(), DataGenerator::random(), DataGenerator::sawtooth(), Fixed_Relation::set_n(), DataGenerator::sorted_asc(), and DataGenerator::sorted_desc().

◆ ensure_not_empty()

◆ erase()

template<typename T >
void Aleph::DynArray< T >::erase ( T item)
inline

Definition at line 1274 of file tpl_dynArray.H.

References Aleph::DynArray< T >::remove().

◆ exist()

template<typename T >
bool Aleph::DynArray< T >::exist ( const size_t  i) const
inline

Return true if the i-th entry is accessible.

By accessible is understood that either the entry has been previously written or the block than would contain it is already allocated,

Parameters
[in]iindex to test

Definition at line 925 of file tpl_dynArray.H.

References Aleph::DynArray< T >::dir, Aleph::DynArray< T >::dir_size, Aleph::DynArray< T >::index_in_dir(), Aleph::DynArray< T >::index_in_seg(), FunctionalMethods< DynArray< T >, T >::maps(), Aleph::DynArray< T >::max_dim, and Aleph::DynArray< T >::seg_size.

Referenced by Aleph::Matrix_Graph< GT, SA >::operator()(), Aleph::Ady_Mat< GT, __Entry_Type, SA >::operator()(), Aleph::matgraph_detail::read_matrix(), Aleph::sequential_search(), and HashStats< HashTbl >::update_stat_len().

◆ fill_dir_to_null()

template<typename T >
void Aleph::DynArray< T >::fill_dir_to_null ( )
inlineprivatenoexcept

◆ fill_seg_to_null()

template<typename T >
void Aleph::DynArray< T >::fill_seg_to_null ( T **  seg)
inlineprivatenoexcept

◆ get_block_size()

template<typename T >
size_t Aleph::DynArray< T >::get_block_size ( ) const
inlinenoexcept

Return the block size.

Definition at line 671 of file tpl_dynArray.H.

References Aleph::DynArray< T >::block_size.

◆ get_dir_size()

template<typename T >
size_t Aleph::DynArray< T >::get_dir_size ( ) const
inlinenoexcept

Return the directory size.

Definition at line 665 of file tpl_dynArray.H.

References Aleph::DynArray< T >::dir_size.

◆ get_first()

template<typename T >
T & Aleph::DynArray< T >::get_first ( ) const
inline

Return a modifiable reference to the first item of array (as if this was a queue)

Definition at line 1307 of file tpl_dynArray.H.

References Aleph::DynArray< T >::ensure_not_empty().

Referenced by TEST().

◆ get_it() [1/4]

template<typename T >
Iterator Aleph::DynArray< T >::get_it ( )
inline

Definition at line 1410 of file tpl_dynArray.H.

Referenced by Aleph::DynArray< T >::get_it().

◆ get_it() [2/4]

template<typename T >
Iterator Aleph::DynArray< T >::get_it ( ) const
inline

Definition at line 1415 of file tpl_dynArray.H.

◆ get_it() [3/4]

◆ get_it() [4/4]

template<typename T >
Iterator Aleph::DynArray< T >::get_it ( const size_t  pos) const
inline

Definition at line 1428 of file tpl_dynArray.H.

References Aleph::DynArray< T >::get_it().

◆ get_last()

template<typename T >
T & Aleph::DynArray< T >::get_last ( ) const
inline

Return a modifiable reference to the last item of array (as if this was a queue)

Definition at line 1315 of file tpl_dynArray.H.

References Aleph::DynArray< T >::ensure_not_empty(), and Aleph::DynArray< T >::size().

Referenced by TEST().

◆ get_num_blocks()

template<typename T >
size_t Aleph::DynArray< T >::get_num_blocks ( ) const
inlinenoexcept

Return the number of blocks consumed by the array.

Definition at line 685 of file tpl_dynArray.H.

References Aleph::DynArray< T >::num_blocks.

◆ get_seg_size()

template<typename T >
size_t Aleph::DynArray< T >::get_seg_size ( ) const
inlinenoexcept

Return the segment size.

Definition at line 668 of file tpl_dynArray.H.

References Aleph::DynArray< T >::seg_size.

◆ index_in_block()

◆ index_in_dir()

◆ index_in_seg()

◆ insert() [1/2]

◆ insert() [2/2]

◆ is_empty()

template<typename T >
bool Aleph::DynArray< T >::is_empty ( ) const
inlinenoexcept

Return true if the array is empty.

Definition at line 1277 of file tpl_dynArray.H.

References Aleph::DynArray< T >::size().

Referenced by Aleph::DynArray< T >::ensure_not_empty(), and TEST().

◆ max_size()

template<typename T >
size_t Aleph::DynArray< T >::max_size ( ) const
inlinenoexcept

Return the maximum allowed dimension (or the maximum number of elements that could have the array treated as a container).

Be careful with the fact that this bound_min_clock is not related to available memory

Definition at line 682 of file tpl_dynArray.H.

References Aleph::DynArray< T >::max_dim.

◆ modulus_by_block_size()

template<typename T >
size_t Aleph::DynArray< T >::modulus_by_block_size ( const size_t  number) const
inlineprivatenoexcept

◆ modulus_from_index_in_dir()

◆ next2Pow()

template<typename T >
static size_t Aleph::DynArray< T >::next2Pow ( const size_t  number)
inlinestaticprivatenoexcept

Definition at line 471 of file tpl_dynArray.H.

References ceil(), and log().

◆ operator()()

template<typename T >
T & Aleph::DynArray< T >::operator() ( const size_t  i) const
inlinenoexcept

Definition at line 913 of file tpl_dynArray.H.

References Aleph::DynArray< T >::access().

◆ operator=() [1/2]

template<typename T >
DynArray< T > & Aleph::DynArray< T >::operator= ( const DynArray< T > &  array)
inline

Copy assignment.

Parameters
[in]arraysource of copy
Exceptions
bad_allocif there is no enough memory

Definition at line 823 of file tpl_dynArray.H.

References Aleph::DynArray< T >::copy_array(), Aleph::DynArray< T >::current_dim, and Aleph::DynArray< T >::cut().

◆ operator=() [2/2]

template<typename T >
DynArray & Aleph::DynArray< T >::operator= ( DynArray< T > &&  other)
inlinenoexcept

Move assignment.

Definition at line 890 of file tpl_dynArray.H.

References FunctionalMethods< DynArray< T >, T >::maps(), and Aleph::DynArray< T >::swap().

◆ operator[]() [1/2]

◆ operator[]() [2/2]

template<typename T >
Proxy Aleph::DynArray< T >::operator[] ( const size_t  i) const
inline

Definition at line 1191 of file tpl_dynArray.H.

References ah_out_of_range_error_if, and Aleph::DynArray< T >::max_dim.

◆ pop()

template<typename T >
T Aleph::DynArray< T >::pop ( )
inline

◆ push() [1/2]

template<typename T >
void Aleph::DynArray< T >::push ( const T data)
inline

Definition at line 1250 of file tpl_dynArray.H.

References Aleph::DynArray< T >::append().

◆ push() [2/2]

template<typename T >
T & Aleph::DynArray< T >::push ( T &&  data)
inline

Definition at line 1253 of file tpl_dynArray.H.

References Aleph::DynArray< T >::append().

◆ put() [1/2]

template<typename T >
void Aleph::DynArray< T >::put ( const T data)
inline

Definition at line 1256 of file tpl_dynArray.H.

References Aleph::DynArray< T >::append().

◆ put() [2/2]

template<typename T >
T & Aleph::DynArray< T >::put ( T &&  data)
inline

Definition at line 1259 of file tpl_dynArray.H.

References Aleph::DynArray< T >::append().

◆ release_all_segments_and_blocks()

◆ release_block()

◆ release_blocks_and_segment()

◆ release_dir()

◆ release_segment()

◆ remove()

template<typename T >
Aleph::DynArray< T >::remove ( T item)
inline

Given a valid reference to an item in the array, it removes it and decrease the dimension.

Parameters
[in]itemvalid reference to the item to remove

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 1266 of file tpl_dynArray.H.

References Aleph::DynArray< T >::access(), Aleph::DynArray< T >::cut_ne(), Aleph::DynArray< T >::ensure_not_empty(), and Aleph::DynArray< T >::size().

Referenced by Aleph::DynArray< T >::erase(), Aleph::DynArray_Set< T, Equal >::remove_all(), Aleph::DynArray_Set< T, Equal >::remove_one(), and TEST().

◆ reserve() [1/2]

template<typename T >
void Aleph::DynArray< T >::reserve ( const size_t  dim)
inline

Assure that the range between 0 and dim is allocated.

Parameters
[in]dimupper index
Exceptions
bad_allocif there is no enough memory

Definition at line 1102 of file tpl_dynArray.H.

References dim(), and Aleph::DynArray< T >::reserve().

◆ reserve() [2/2]

template<typename T >
void Aleph::DynArray< T >::reserve ( const size_t  l,
const size_t  r 
)
inline

◆ resize_dir()

◆ reverse()

template<typename T >
DynArray & Aleph::DynArray< T >::reverse ( )
inline

Reverse the order of items in array.

Definition at line 1280 of file tpl_dynArray.H.

References Aleph::DynArray< T >::current_dim, Aleph::DynArray< T >::swap(), and Aleph::DynArray< T >::touch().

◆ set_default_initial_value() [1/2]

template<typename T >
Aleph::DynArray< T >::set_default_initial_value ( const T value)
inlinenoexcept

Set the default value.

The default value of a dynamic array is the value to be returned when entries not still written are accessed.

Parameters
[in]valuedefault value

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 694 of file tpl_dynArray.H.

References Aleph::DynArray< T >::default_initial_value, and Aleph::DynArray< T >::default_initial_value_ptr.

Referenced by Aleph::Matrix_Graph< GT, SA >::copy(), and Aleph::Matrix_Graph< GT, SA >::copy().

◆ set_default_initial_value() [2/2]

template<typename T >
void Aleph::DynArray< T >::set_default_initial_value ( T &&  value = T())
inline

◆ size()

template<typename T >
size_t Aleph::DynArray< T >::size ( ) const
inlinenoexcept

Return the current dimension of array.

According to usage style, this could represent the number of items stored in the array seen as a container

Definition at line 676 of file tpl_dynArray.H.

References Aleph::DynArray< T >::current_dim.

Referenced by OhashCommon< HashTbl, Key >::Stats::Stats(), Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::add_point(), Pointer_Table::allocate_above_heap(), Aleph::DynArray< T >::append(), assign_arcs(), assign_distance(), assign_parrectangle(), assign_rectangle(), assign_scratch(), assign_shadow(), assign_tag(), assign_triangle(), assign_without_arc(), assign_without_node(), assign_xoffset(), assign_yoffset(), Aleph::bubble_sort(), Aleph::build_index(), Aleph::build_index_ptr(), build_tree(), Pointer_Table::cleanup_free_table(), Aleph::DynArray_Set< T, Equal >::count(), demo_dynarray(), Aleph::dynarray_to_Array(), Aleph::dynarray_to_DynDlist(), Aleph::dynarray_to_DynList(), Aleph::DynArray_to_vector(), Aleph::DynArray< T >::Iterator::end(), file_to_dynarrays(), Pointer_Table::frees(), generate_split_lines(), Aleph::DynArray< T >::Iterator::get_curr(), Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::get_east_point(), Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::get_height(), Aleph::DynArray< T >::get_it(), Aleph::DynArray< T >::get_last(), Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::get_north_point(), Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::get_south_point(), Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::get_west_point(), Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::get_width(), Aleph::DynArray< T >::Iterator::has_curr(), Aleph::DynArrayHeap< T, Compare >::Iterator::has_curr(), Aleph::heapsort(), Aleph::Floyd_All_Shortest_Paths< GT, Distance, SA >::index_node(), Pointer_Table::insert_in_free_table(), Aleph::introsort(), Pointer_Table::invariant(), Aleph::DynArray< T >::is_empty(), Aleph::DynArray< T >::Iterator::is_last(), load_key_option(), main(), Aleph::DynArray< T >::Iterator::next(), Aleph::DynArray< T >::pop(), print_dynarray(), OhashCommon< HashTbl, Key >::print_stats(), HashStats< HashTbl >::print_stats(), Aleph::quicksort(), Aleph::random_select(), reassign_key(), Aleph::DynArray< T >::remove(), Aleph::DynArray_Set< T, Equal >::remove_all(), Pointer_Table::remove_pointer(), Aleph::DynArray< T >::Iterator::reset_last(), Aleph::DynArray_Set< T, Equal >::search(), Aleph::selection_sort(), Aleph::shellsort(), Pointer_Table::size(), Dynamic_Event_Table< Signature >::size(), HashStats< HashTbl >::stats(), Aleph::ODhashTable< Key, Cmp >::stats(), Aleph::OLhashTable< Key, Cmp >::stats(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), to_array(), to_dyndlist(), to_dynlist(), Aleph::DynArray< T >::top(), and Aleph::Xml_Graph< GT, Node_Reader, Arc_Reader, Node_Writer, Arc_Writer >::write_graph().

◆ swap()

◆ test()

template<typename T >
T * Aleph::DynArray< T >::test ( const size_t  i) const
inlinenoexcept

Test if the i-th entry es writable,.

test(i) inspects if the entry i is already allocated. If affirmative, then a pointer to the entry in the array is returned. Otherwise, nullptr is returned.

Parameters
[in]iindex to test.
Returns
nullptr if the entry is not allocated; a valid pointer inside the array otherwise

Definition at line 957 of file tpl_dynArray.H.

References Aleph::DynArray< T >::dir, Aleph::DynArray< T >::index_in_block(), Aleph::DynArray< T >::index_in_dir(), Aleph::DynArray< T >::index_in_seg(), and Aleph::DynArray< T >::max_dim.

◆ top()

template<typename T >
T & Aleph::DynArray< T >::top ( ) const
inline

Return a modifiable reference to the last item of stack.

Definition at line 1299 of file tpl_dynArray.H.

References Aleph::DynArray< T >::ensure_not_empty(), and Aleph::DynArray< T >::size().

Referenced by Aleph::Abstract_Euclidian_Plane< __Euclidian_Graph >::add_point().

◆ touch()

template<typename T >
T & Aleph::DynArray< T >::touch ( const size_t  i)
inline

Touch the entry i.

touch(i) testes if the block that would contain to i is already allocated. If this is not the case, then the block, and eventually the segment, is allocated. If everything is ok, the method returns a valid pointer to the entry inside the array.

touch(i) is a concise and effective way to test and eventually to allocate memory for a new entry.

Parameters
[in]iindex to touch
Exceptions
bad_allocif there is no enough memory
See also
cut

Definition at line 988 of file tpl_dynArray.H.

References Aleph::DynArray< T >::allocate_block(), Aleph::DynArray< T >::allocate_segment(), Aleph::DynArray< T >::current_dim, Aleph::DynArray< T >::dir, Aleph::DynArray< T >::index_in_block(), Aleph::DynArray< T >::index_in_dir(), Aleph::DynArray< T >::index_in_seg(), FunctionalMethods< DynArray< T >, T >::maps(), Aleph::DynArray< T >::max_dim, Aleph::DynArray< T >::release_segment(), and Aleph::DynArray< T >::resize_dir().

Referenced by Aleph::DynArray< T >::append(), Aleph::Matrix_Graph< GT, SA >::copy(), Aleph::Bellman_Ford< GT, Distance, Ait, NAit, SA >::init_with_indexes(), Aleph::Ady_Mat< GT, __Entry_Type, SA >::operate_all_arcs_list_graph(), Aleph::Ady_Mat< GT, __Entry_Type, SA >::operate_all_arcs_list_graph(), Aleph::Ady_Mat< GT, __Entry_Type, SA >::operate_all_arcs_matrix(), Aleph::Ady_Mat< GT, __Entry_Type, SA >::operate_all_arcs_matrix(), Aleph::Matrix_Graph< GT, SA >::operator()(), Aleph::Ady_Mat< GT, __Entry_Type, SA >::operator()(), Aleph::DynArray< T >::reverse(), TEST(), TEST(), and HashStats< HashTbl >::update_stat_len().

◆ traverse() [1/4]

template<typename T >
template<class Operation >
bool Aleph::DynArray< T >::traverse ( Operation &&  operation)
inline

Definition at line 1493 of file tpl_dynArray.H.

References FunctionalMethods< DynArray< T >, T >::maps().

◆ traverse() [2/4]

template<typename T >
template<class Operation >
bool Aleph::DynArray< T >::traverse ( Operation &&  operation) const
inline

Definition at line 1486 of file tpl_dynArray.H.

References FunctionalMethods< DynArray< T >, T >::maps().

◆ traverse() [3/4]

template<typename T >
template<class Operation >
Aleph::DynArray< T >::traverse ( Operation operation)
inline

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 1479 of file tpl_dynArray.H.

References Aleph::DynArray< T >::__traverse(), and FunctionalMethods< DynArray< T >, T >::maps().

◆ traverse() [4/4]

template<typename T >
template<class Operation >
bool Aleph::DynArray< T >::traverse ( Operation operation) const
inline

Traverse all the array and execute a conditioned operation must have the signature:

bool operation(const T & item)
Aleph::DynList< __T > maps(Operation &op) const
Map the elements of the container.
Definition ah-dry.H:904
std::decay_t< typename HeadC::Item_Type > T
Definition ah-zip.H:107

If

returns false then the traversal is stopped; otherwise the traverse move to the next item.

Parameters
[in]operation
Returns
true if all items are traversed; false otherwise

Definition at line 1472 of file tpl_dynArray.H.

References Aleph::DynArray< T >::__traverse(), and FunctionalMethods< DynArray< T >, T >::maps().

◆ two_raised()

Friends And Related Symbol Documentation

◆ BitArray

template<typename T >
friend class BitArray
friend

Definition at line 206 of file tpl_dynArray.H.

Member Data Documentation

◆ block_size

◆ current_dim

◆ default_initial_value

◆ default_initial_value_ptr

◆ Default_Pow_Block

template<typename T >
const size_t Aleph::DynArray< T >::Default_Pow_Block = 12
static

Default two power for segment size.

Definition at line 215 of file tpl_dynArray.H.

Referenced by Aleph::DynArray< T >::compute_sizes().

◆ Default_Pow_Dir

template<typename T >
const size_t Aleph::DynArray< T >::Default_Pow_Dir = 6
static

The type of element stored in the array.

Definition at line 213 of file tpl_dynArray.H.

Referenced by Aleph::DynArray< T >::compute_sizes().

◆ Default_Pow_Seg

template<typename T >
const size_t Aleph::DynArray< T >::Default_Pow_Seg = 8
static

Default two power for directory size.

Definition at line 214 of file tpl_dynArray.H.

Referenced by Aleph::DynArray< T >::compute_sizes().

◆ dir

◆ dir_size

◆ mask_block

◆ mask_seg

template<typename T >
size_t Aleph::DynArray< T >::mask_seg = seg_size - 1
private

Definition at line 298 of file tpl_dynArray.H.

Referenced by Aleph::DynArray< T >::swap().

◆ mask_seg_plus_block

template<typename T >
size_t Aleph::DynArray< T >::mask_seg_plus_block = two_raised(seg_plus_block_pow) - 1
mutableprivate

◆ Max_Bits_Allowed

template<typename T >
const size_t Aleph::DynArray< T >::Max_Bits_Allowed = 8 * sizeof(size_t)
staticprivate

Default two power for block size.

Definition at line 218 of file tpl_dynArray.H.

Referenced by Aleph::DynArray< T >::two_raised().

◆ max_dim

◆ Max_Dim_Allowed

template<typename T >
const unsigned long long Aleph::DynArray< T >::Max_Dim_Allowed
static
Initial value:
=
256 * 1024 * 1024 * 1024ull

Maximum dimension allowed.

Definition at line 222 of file tpl_dynArray.H.

Referenced by Aleph::DynArray< T >::DynArray(), and Aleph::DynArray< T >::DynArray().

◆ Max_Pow_Block

template<typename T >
const size_t Aleph::DynArray< T >::Max_Pow_Block
staticprivate
Initial value:
=
static const size_t Default_Pow_Seg
Default two power for directory size.
static const size_t Default_Pow_Dir
The type of element stored in the array.
static const size_t Max_Bits_Allowed
Default two power for block size.

Definition at line 225 of file tpl_dynArray.H.

◆ num_blocks

◆ num_segs

◆ pow_block

template<typename T >
size_t Aleph::DynArray< T >::pow_block
mutableprivate
Initial value:
=
static const size_t Max_Pow_Block
static const size_t Default_Pow_Block
Default two power for segment size.

Definition at line 229 of file tpl_dynArray.H.

Referenced by Aleph::DynArray< T >::divide_by_block_size(), Aleph::DynArray< T >::index_in_dir(), Aleph::DynArray< T >::index_in_seg(), Aleph::DynArray< T >::resize_dir(), and Aleph::DynArray< T >::swap().

◆ pow_dir

template<typename T >
size_t Aleph::DynArray< T >::pow_dir = Default_Pow_Dir
mutableprivate

Definition at line 227 of file tpl_dynArray.H.

Referenced by Aleph::DynArray< T >::resize_dir(), and Aleph::DynArray< T >::swap().

◆ pow_seg

◆ seg_plus_block_pow

template<typename T >
size_t Aleph::DynArray< T >::seg_plus_block_pow = pow_seg + pow_block
mutableprivate

◆ seg_size


The documentation for this class was generated from the following files: