|
sparrow 2.4.0
C++20 idiomatic APIs for the Apache Arrow Columnar Format
|
#include <array_base.hpp>
Classes | |
| struct | iterator_types |
Public Types | |
| using | self_type = array_crtp_base<D> |
| using | derived_type = D |
| using | inner_types = array_inner_types<derived_type> |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | bitmap_type = typename inner_types::bitmap_type |
| using | const_bitmap_type = typename inner_types::const_bitmap_type |
| using | bitmap_const_reference = bitmap_type::const_reference |
| using | bitmap_iterator = bitmap_type::iterator |
| using | const_bitmap_iterator = const_bitmap_type::const_iterator |
| using | const_bitmap_range = std::ranges::subrange<const_bitmap_iterator> |
| using | inner_value_type = typename inner_types::inner_value_type |
| using | value_type = nullable<inner_value_type> |
| using | inner_const_reference = typename inner_types::inner_const_reference |
| using | const_reference = nullable<inner_const_reference, bitmap_const_reference> |
| using | const_value_iterator = typename inner_types::const_value_iterator |
| using | const_value_range = std::ranges::subrange<const_value_iterator> |
| using | iterator_tag = typename inner_types::iterator_tag |
| using | const_iterator = layout_iterator<iterator_types> |
| using | const_reverse_iterator = std::reverse_iterator<const_iterator> |
Public Member Functions | |
| 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. | |
| constexpr void | slice_inplace (size_type start, size_type end) |
| Slices the array in place. | |
Protected Member Functions | |
| 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 > |
| class | detail::array_access |
Additional Inherited Members | |
Protected Types inherited from sparrow::crtp_base< D > | |
| using | derived_type = D |
Definition at line 108 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::bitmap_const_reference = bitmap_type::const_reference |
Definition at line 122 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::bitmap_iterator = bitmap_type::iterator |
Definition at line 123 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::bitmap_type = typename inner_types::bitmap_type |
Definition at line 120 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::const_bitmap_iterator = const_bitmap_type::const_iterator |
Definition at line 124 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::const_bitmap_range = std::ranges::subrange<const_bitmap_iterator> |
Definition at line 125 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::const_bitmap_type = typename inner_types::const_bitmap_type |
Definition at line 121 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::const_iterator = layout_iterator<iterator_types> |
Definition at line 147 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::const_reference = nullable<inner_const_reference, bitmap_const_reference> |
Definition at line 131 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::const_reverse_iterator = std::reverse_iterator<const_iterator> |
Definition at line 148 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::const_value_iterator = typename inner_types::const_value_iterator |
Definition at line 133 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::const_value_range = std::ranges::subrange<const_value_iterator> |
Definition at line 134 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::derived_type = D |
Definition at line 113 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::difference_type = std::ptrdiff_t |
Definition at line 118 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::inner_const_reference = typename inner_types::inner_const_reference |
Definition at line 130 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::inner_types = array_inner_types<derived_type> |
Definition at line 115 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::inner_value_type = typename inner_types::inner_value_type |
Definition at line 127 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::iterator_tag = typename inner_types::iterator_tag |
Definition at line 136 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::self_type = array_crtp_base<D> |
Definition at line 112 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::size_type = std::size_t |
Definition at line 117 of file array_base.hpp.
| using sparrow::array_crtp_base< D >::value_type = nullable<inner_value_type> |
Definition at line 128 of file array_base.hpp.
|
explicitprotected |
Protected constructor from Arrow proxy.
| proxy | Arrow proxy containing array data and schema |
Definition at line 669 of file array_base.hpp.
|
constexprprotecteddefault |
|
constexprprotecteddefaultnoexcept |
|
nodiscardconstexpr |
Gets element at specified position with bounds checking.
| i | Index of the element to access |
| std::out_of_range | if i >= size() |
Definition at line 574 of file array_base.hpp.
|
nodiscardconstexpr |
Gets reference to the last element.
Definition at line 602 of file array_base.hpp.
|
nodiscardconstexpr |
Gets iterator to the beginning of the array.
Definition at line 609 of file array_base.hpp.
|
nodiscardconstexpr |
Gets the validity bitmap as a range.
Definition at line 657 of file array_base.hpp.
|
constexprprotected |
Gets bitmap iterator to the beginning.
Definition at line 694 of file array_base.hpp.
|
constexprprotected |
Gets const bitmap iterator to the beginning.
Definition at line 706 of file array_base.hpp.
|
constexprprotected |
Gets const bitmap iterator to the end.
Definition at line 712 of file array_base.hpp.
|
constexprprotected |
Gets bitmap iterator to the end.
Definition at line 700 of file array_base.hpp.
|
nodiscardconstexpr |
Gets const iterator to the beginning of the array.
Definition at line 621 of file array_base.hpp.
|
nodiscardconstexpr |
Gets const iterator to the end of the array.
Definition at line 627 of file array_base.hpp.
|
nodiscardconstexpr |
Gets const reverse iterator to the beginning of reversed array.
Definition at line 645 of file array_base.hpp.
|
nodiscardconstexpr |
Gets const reverse iterator to the end of reversed array.
Definition at line 651 of file array_base.hpp.
|
nodiscardconstexpr |
Checks if the array is empty.
Definition at line 550 of file array_base.hpp.
|
nodiscardconstexpr |
Gets iterator to the end of the array.
Definition at line 615 of file array_base.hpp.
|
nodiscardconstexpr |
Gets reference to the first element.
Definition at line 595 of file array_base.hpp.
|
nodiscardconstexprprotectednoexcept |
Gets const reference to the Arrow proxy.
Definition at line 681 of file array_base.hpp.
|
nodiscardconstexprprotectednoexcept |
Gets mutable reference to the Arrow proxy.
Definition at line 675 of file array_base.hpp.
|
constexprprotected |
Checks if element at index i has a valid value.
| i | Index of element to check |
Definition at line 687 of file array_base.hpp.
|
nodiscard |
Gets the metadata associated with the array.
Definition at line 544 of file array_base.hpp.
|
nodiscardconstexpr |
Gets the optional name of the array.
Definition at line 538 of file array_base.hpp.
|
nodiscardconstexpr |
Gets the count of null elements in the array.
Definition at line 568 of file array_base.hpp.
|
nodiscardconstexpr |
Gets the starting offset within the buffers.
Definition at line 562 of file array_base.hpp.
|
constexprprotecteddefaultnoexcept |
|
constexprprotecteddefault |
|
nodiscardconstexpr |
Gets element at specified position without bounds checking.
| i | Index of the element to access |
Definition at line 587 of file array_base.hpp.
|
nodiscardconstexpr |
Gets reverse iterator to the beginning of reversed array.
Definition at line 633 of file array_base.hpp.
|
nodiscardconstexpr |
Gets reverse iterator to the end of reversed array.
Definition at line 639 of file array_base.hpp.
|
nodiscardconstexpr |
Gets the number of elements in the array.
Definition at line 556 of file array_base.hpp.
|
nodiscardconstexpr |
Creates a sliced copy of the array.
Creates a new array containing only elements between start and end indices. The underlying Arrow data is deep-copied first, then the copied Arrow offset and length are modified to represent the requested range.
| start | Index of the first element to keep (inclusive) |
| end | Index of the first element to exclude (exclusive) |
Definition at line 718 of file array_base.hpp.
|
constexpr |
Slices the array in place.
Updates this array so that it keeps only elements between start and end. The underlying data buffers are not copied.
| start | Index of the first element to keep (inclusive) |
| end | Index of the first element to exclude (exclusive) |
Definition at line 732 of file array_base.hpp.
|
nodiscardconstexpr |
Creates a sliced view of the array.
Creates a view over elements between start and end indices without copying. The underlying data buffers are shared with the original array.
| start | Index of the first element to keep (inclusive) |
| end | Index of the first element to exclude (exclusive) |
Definition at line 725 of file array_base.hpp.
|
nodiscardconstexpr |
Gets the raw values as a range.
Definition at line 663 of file array_base.hpp.
|
friend |
Definition at line 524 of file array_base.hpp.
|
friend |
Definition at line 520 of file array_base.hpp.