|
sparrow 1.3.0
|
Base class definining common interface for arrays with a bitmap. More...
#include <mutable_array_base.hpp>
Classes | |
| struct | iterator_types |
Public Member Functions | |
| constexpr reference | operator[] (size_type i) |
| Returns a reference to the element at the specified position in the array. | |
| constexpr iterator | begin () |
| Returns an iterator to the first element of the array. | |
| constexpr iterator | end () |
| Returns a iterator to the element following the last element of the array. | |
| template<typename T> | |
| constexpr void | resize (size_type new_size, const nullable< T > &value) |
Resizes the array to contain new_length elements, does nothing if new_length == size(). | |
| template<typename T> | |
| constexpr iterator | insert (const_iterator pos, const nullable< T > &value) |
| template<typename T> | |
| constexpr iterator | insert (const_iterator pos, const nullable< T > &value, size_type count) |
| template<typename T> | |
| constexpr iterator | insert (const_iterator pos, std::initializer_list< nullable< T > > values) |
| template<typename InputIt> requires std::input_iterator<InputIt> && mpl::is_type_instance_of_v<typename std::iterator_traits<InputIt>::value_type, nullable> | |
| constexpr iterator | insert (const_iterator pos, InputIt first, InputIt last) |
Inserts elements from range [first , last ) before pos in the array. | |
| template<std::ranges::input_range R> requires mpl::is_type_instance_of_v<std::ranges::range_value_t<R>, nullable> | |
| constexpr iterator | insert (const_iterator pos, const R &range) |
Inserts elements from range range before pos in the array. | |
| constexpr iterator | erase (const_iterator pos) |
Removes the element at pos from the array. | |
| constexpr iterator | erase (const_iterator first, const_iterator last) |
Removes the elements in the range [ first , last ) from the array. | |
| template<typename T> | |
| constexpr void | push_back (const nullable< T > &value) |
Appends a copy of value to the end of the array. | |
| constexpr void | pop_back () |
| Removes the last element of the array. | |
| constexpr void | zero_null_values (const inner_value_type &value=inner_value_type()) |
| Sets all null values in the array to zero. | |
| template<typename T> | |
| constexpr auto | insert (const_iterator pos, const nullable< T > &value) -> iterator |
Inserts a copy of value before pos in the array. | |
| template<typename T> | |
| constexpr auto | insert (const_iterator pos, const nullable< T > &value, size_type count) -> iterator |
Inserts count copies of value before pos in the array. | |
| template<typename T> | |
| constexpr auto | insert (const_iterator pos, std::initializer_list< nullable< T > > values) -> iterator |
Inserts elements from initializer list values before pos in the array. | |
| constexpr const_reference | operator[] (size_type i) const |
| Gets element at specified position without bounds checking. | |
| constexpr const_iterator | begin () const |
| Gets iterator to the beginning of the array. | |
| constexpr const_iterator | end () const |
| Gets iterator to the end of the array. | |
Public Member Functions inherited from sparrow::array_crtp_base< D > | |
| constexpr std::optional< std::string_view > | name () const |
| Gets the optional name of the array. | |
| std::optional< key_value_view > | metadata () const |
| Gets the metadata associated with the array. | |
| constexpr bool | empty () const |
| Checks if the array is empty. | |
| constexpr size_type | size () const |
| Gets the number of elements in the array. | |
| constexpr size_type | offset () const |
| Gets the starting offset within the buffers. | |
| constexpr std::int64_t | null_count () const |
| Gets the count of null elements in the array. | |
| constexpr const_reference | at (size_type i) const |
| Gets element at specified position with bounds checking. | |
| constexpr const_reference | operator[] (size_type i) const |
| Gets element at specified position without bounds checking. | |
| constexpr const_reference | front () const |
| Gets reference to the first element. | |
| constexpr const_reference | back () const |
| Gets reference to the last element. | |
| constexpr const_iterator | begin () const |
| Gets iterator to the beginning of the array. | |
| constexpr const_iterator | end () const |
| Gets iterator to the end of the array. | |
| constexpr const_iterator | cbegin () const |
| Gets const iterator to the beginning of the array. | |
| constexpr const_iterator | cend () const |
| Gets const iterator to the end of the array. | |
| constexpr const_reverse_iterator | rbegin () const |
| Gets reverse iterator to the beginning of reversed array. | |
| constexpr const_reverse_iterator | rend () const |
| Gets reverse iterator to the end of reversed array. | |
| constexpr const_reverse_iterator | crbegin () const |
| Gets const reverse iterator to the beginning of reversed array. | |
| constexpr const_reverse_iterator | crend () const |
| Gets const reverse iterator to the end of reversed array. | |
| constexpr const_bitmap_range | bitmap () const |
| Gets the validity bitmap as a range. | |
| constexpr const_value_range | values () const |
| Gets the raw values as a range. | |
| constexpr D | slice (size_type start, size_type end) const |
| Creates a sliced copy of the array. | |
| constexpr D | slice_view (size_type start, size_type end) const |
| Creates a sliced view of the array. | |
Protected Member Functions | |
| mutable_array_base (arrow_proxy) | |
| constexpr | mutable_array_base (const mutable_array_base &) noexcept=default |
| constexpr mutable_array_base & | operator= (const mutable_array_base &) noexcept=default |
| constexpr | mutable_array_base (mutable_array_base &&) noexcept=default |
| constexpr mutable_array_base & | operator= (mutable_array_base &&) noexcept=default |
| constexpr bitmap_reference | has_value (size_type i) |
| constexpr bitmap_iterator | bitmap_begin () |
| constexpr bitmap_iterator | bitmap_end () |
| constexpr bitmap_const_reference | has_value (size_type i) const |
| Checks if element at index i has a valid value. | |
Protected Member Functions inherited from sparrow::array_crtp_base< D > | |
| array_crtp_base (arrow_proxy) | |
| Protected constructor from Arrow proxy. | |
| constexpr | array_crtp_base (const array_crtp_base &)=default |
| constexpr array_crtp_base & | operator= (const array_crtp_base &)=default |
| constexpr | array_crtp_base (array_crtp_base &&) noexcept=default |
| constexpr array_crtp_base & | operator= (array_crtp_base &&) noexcept=default |
| constexpr arrow_proxy & | get_arrow_proxy () noexcept |
| Gets mutable reference to the Arrow proxy. | |
| constexpr const arrow_proxy & | get_arrow_proxy () const noexcept |
| Gets const reference to the Arrow proxy. | |
| constexpr bitmap_const_reference | has_value (size_type i) const |
| Checks if element at index i has a valid value. | |
| constexpr const_bitmap_iterator | bitmap_begin () const |
| Gets bitmap iterator to the beginning. | |
| constexpr const_bitmap_iterator | bitmap_end () const |
| Gets bitmap iterator to the end. | |
| constexpr const_bitmap_iterator | bitmap_cbegin () const |
| Gets const bitmap iterator to the beginning. | |
| constexpr const_bitmap_iterator | bitmap_cend () const |
| Gets const bitmap iterator to the end. | |
Protected Member Functions inherited from sparrow::crtp_base< D > | |
| constexpr derived_type & | derived_cast () |
| constexpr const derived_type & | derived_cast () const |
Friends | |
| class | layout_iterator< iterator_types > |
Additional Inherited Members | |
Protected Types inherited from sparrow::crtp_base< D > | |
| using | derived_type = D |
Base class definining common interface for arrays with a bitmap.
This class is a CRTP base class that defines and implements common interface for arrays with a bitmap. The immutable interface is inherited from array_crtp_base.
| D | The derived type, i.e. the inheriting class for which mutable_array_base provides the interface. |
Definition at line 35 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::base_type = array_crtp_base<D> |
Definition at line 40 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::bitmap_const_reference = bitmap_type::const_reference |
Definition at line 49 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::bitmap_iterator = bitmap_type::iterator |
Definition at line 50 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::bitmap_range = std::ranges::subrange<bitmap_iterator> |
Definition at line 51 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::bitmap_reference = bitmap_type::reference |
Definition at line 48 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::bitmap_type = typename inner_types::bitmap_type |
Definition at line 47 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::const_bitmap_range = base_type::const_bitmap_range |
Definition at line 52 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::const_iterator = base_type::const_iterator |
Definition at line 77 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::const_reference = base_type::const_reference |
Definition at line 61 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::derived_type = D |
Definition at line 41 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::difference_type = base_type::difference_type |
Definition at line 45 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::inner_const_reference = typename base_type::inner_const_reference |
Definition at line 58 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::inner_reference = typename inner_types::inner_reference |
Definition at line 57 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::inner_types = array_inner_types<derived_type> |
Definition at line 42 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::inner_value_type = typename base_type::inner_value_type |
Definition at line 54 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::iterator = layout_iterator<iterator_types> |
Definition at line 76 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::iterator_tag = base_type::iterator_tag |
Definition at line 65 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::reference = nullable<inner_reference, bitmap_reference> |
Definition at line 60 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::self_type = mutable_array_base<D> |
Definition at line 39 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::size_type = base_type::size_type |
Definition at line 44 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::value_iterator = typename inner_types::value_iterator |
Definition at line 63 of file mutable_array_base.hpp.
| using sparrow::mutable_array_base< D >::value_type = typename base_type::value_type |
Definition at line 55 of file mutable_array_base.hpp.
|
protected |
Definition at line 198 of file mutable_array_base.hpp.
|
constexprprotecteddefaultnoexcept |
|
constexprprotecteddefaultnoexcept |
|
nodiscardconstexpr |
Returns an iterator to the first element of the array.
Definition at line 207 of file mutable_array_base.hpp.
|
nodiscardconstexpr |
Gets iterator to the beginning of the array.
Definition at line 271 of file array_base.hpp.
|
nodiscardconstexprprotected |
Definition at line 245 of file mutable_array_base.hpp.
|
nodiscardconstexprprotected |
Definition at line 251 of file mutable_array_base.hpp.
|
nodiscardconstexpr |
Returns a iterator to the element following the last element of the array.
Definition at line 218 of file mutable_array_base.hpp.
|
nodiscardconstexpr |
Gets iterator to the end of the array.
Definition at line 281 of file array_base.hpp.
|
constexpr |
Removes the elements in the range [ first , last ) from the array.
| first | The iterator to the first element to remove. |
| last | The iterator to the element following the last element to remove. |
Definition at line 351 of file mutable_array_base.hpp.
|
constexpr |
Removes the element at pos from the array.
| pos | The iterator to the element to remove. |
Definition at line 336 of file mutable_array_base.hpp.
|
nodiscardconstexprprotected |
Definition at line 238 of file mutable_array_base.hpp.
|
constexprprotected |
Checks if element at index i has a valid value.
| i | Index of element to check |
Definition at line 457 of file array_base.hpp.
|
constexpr |
|
constexpr |
Inserts a copy of value before pos in the array.
| pos | The iterator before which the element will be inserted (pos may be the end() iterator). |
| value | The element to insert. |
Definition at line 284 of file mutable_array_base.hpp.
|
constexpr |
|
constexpr |
Inserts count copies of value before pos in the array.
| pos | The iterator before which the elements will be inserted (pos may be the end() iterator). |
| value | The element to insert. |
| count | The number of elements to insert. |
pos if count == 0. Definition at line 300 of file mutable_array_base.hpp.
|
inlineconstexpr |
Inserts elements from range range before pos in the array.
| R | the type of range to insert. |
| pos | The iterator before which the elements will be inserted (pos may be the end() iterator). |
| range | The range of values to insert. |
pos if range is empty. Definition at line 161 of file mutable_array_base.hpp.
|
inlineconstexpr |
Inserts elements from range [first , last ) before pos in the array.
| pos | The iterator before which the elements will be inserted (pos may be the end() iterator). |
| first | The iterator to the first element to insert. |
| last | The iterator to the element following the last element to insert. |
pos if first == last. Definition at line 110 of file mutable_array_base.hpp.
|
constexpr |
|
constexpr |
Inserts elements from initializer list values before pos in the array.
| pos | The iterator before which the elements will be inserted (pos may be the end() iterator). |
| values | The std::initializer_list to insert the values from. |
pos if values is empty. Definition at line 324 of file mutable_array_base.hpp.
|
constexprprotecteddefaultnoexcept |
|
constexprprotecteddefaultnoexcept |
|
nodiscardconstexpr |
Returns a reference to the element at the specified position in the array.
| i | the index of the element in the array. |
Definition at line 230 of file mutable_array_base.hpp.
|
nodiscardconstexpr |
Gets element at specified position without bounds checking.
| i | Index of the element to access |
Definition at line 233 of file array_base.hpp.
|
constexpr |
Removes the last element of the array.
Definition at line 387 of file mutable_array_base.hpp.
|
constexpr |
Appends a copy of value to the end of the array.
| value | The value o the element to append. |
Definition at line 378 of file mutable_array_base.hpp.
|
constexpr |
Resizes the array to contain new_length elements, does nothing if new_length == size().
If the current size is greater than new_length, the array is reduced to its first new_length elements. If the current size is less than new_length, additional copies of values are appended.
| new_length | The new size of the array. |
| value | The value to initialize the new elements with. |
Definition at line 266 of file mutable_array_base.hpp.
|
constexpr |
Sets all null values in the array to zero.
This function is a no-op if the array does not have a bitmap.
Definition at line 398 of file mutable_array_base.hpp.
|
friend |
Definition at line 188 of file mutable_array_base.hpp.