sparrow 0.9.0
Loading...
Searching...
No Matches
sparrow::fixed_width_binary_array_impl< T, CR > Class Template Reference

#include <fixed_width_binary_array.hpp>

Inheritance diagram for sparrow::fixed_width_binary_array_impl< T, CR >:
[legend]
Collaboration diagram for sparrow::fixed_width_binary_array_impl< T, CR >:
[legend]

Public Types

using self_type = fixed_width_binary_array_impl<T, CR>
 
using base_type = mutable_array_bitmap_base<self_type>
 
using inner_types = array_inner_types<self_type>
 
using inner_value_type = typename inner_types::inner_value_type
 
using inner_reference = typename inner_types::inner_reference
 
using inner_const_reference = typename inner_types::inner_const_reference
 
using bitmap_type = typename base_type::bitmap_type
 
using bitmap_reference = typename base_type::bitmap_reference
 
using bitmap_const_reference = typename base_type::bitmap_const_reference
 
using const_bitmap_range = typename base_type::const_bitmap_range
 
using value_type = nullable<inner_value_type>
 
using reference = nullable<inner_reference, bitmap_reference>
 
using const_reference = nullable<inner_const_reference, bitmap_const_reference>
 
using size_type = typename base_type::size_type
 
using difference_type = typename base_type::difference_type
 
using iterator_tag = typename base_type::iterator_tag
 
using data_iterator = typename inner_types::data_iterator
 
using const_data_iterator = typename inner_types::const_data_iterator
 
using data_value_type = typename inner_types::data_value_type
 
using value_iterator = typename inner_types::value_iterator
 
using const_value_iterator = typename inner_types::const_value_iterator
 
using functor_type = typename inner_types::functor_type
 
using const_functor_type = typename inner_types::const_functor_type
 
- Public Types inherited from sparrow::array_bitmap_base_impl< D, true >
using base_type
 
using size_type
 
using bitmap_type
 
using bitmap_iterator
 
using const_bitmap_iterator
 
using bitmap_const_reference
 
using difference_type
 
using const_bitmap_range
 
using iterator_tag
 

Public Member Functions

 fixed_width_binary_array_impl (arrow_proxy)
 Constructs fixed-width binary array from Arrow proxy.
 
template<class... ARGS>
requires (mpl::excludes_copy_and_move_ctor_v<fixed_width_binary_array_impl<T, CR>, ARGS...>)
 fixed_width_binary_array_impl (ARGS &&... args)
 Generic constructor for creating fixed-width binary array.
 
constexpr inner_reference value (size_type i)
 Gets mutable reference to element at specified index.
 
constexpr inner_const_reference value (size_type i) const
 Gets const reference to element at specified index.
 
template<std::ranges::input_range R, validity_bitmap_input VB, input_metadata_container METADATA_RANGE>
requires ( std::ranges::input_range<std::ranges::range_value_t<R>> && // a range of ranges mpl::char_like<std::ranges::range_value_t<std::ranges::range_value_t<R>>> // inner range is a // range of char-like )
arrow_proxy create_proxy (R &&values, VB &&validity_input, std::optional< std::string_view > name, std::optional< METADATA_RANGE > metadata)
 
template<std::ranges::input_range R, input_metadata_container METADATA_RANGE>
requires ( std::ranges::input_range<std::ranges::range_value_t<R>> && // a range of ranges mpl::char_like<std::ranges::range_value_t<std::ranges::range_value_t<R>>> // inner range is a // range of char-like )
arrow_proxy create_proxy (R &&values, bool nullable, std::optional< std::string_view > name, std::optional< METADATA_RANGE > metadata)
 
template<std::ranges::input_range NULLABLE_RANGE, input_metadata_container METADATA_RANGE>
requires mpl::is_type_instance_of_v<std::ranges::range_value_t<NULLABLE_RANGE>, nullable> && std::ranges::input_range<typename std::ranges::range_value_t<NULLABLE_RANGE>::value_type> && std::is_same_v< std::ranges::range_value_t<typename std::ranges::range_value_t<NULLABLE_RANGE>::value_type>, byte_t>
arrow_proxy create_proxy (NULLABLE_RANGE &&range, std::optional< std::string_view > name, std::optional< METADATA_RANGE > metadata)
 
template<std::ranges::sized_range U>
requires mpl::convertible_ranges<U, T>
constexpr auto insert_value (const_value_iterator pos, U value, size_type count) -> value_iterator
 
template<typename InputIt>
requires std::input_iterator<InputIt> && mpl::convertible_ranges<typename std::iterator_traits<InputIt>::value_type, T>
constexpr auto insert_values (const_value_iterator pos, InputIt first, InputIt last) -> value_iterator
 
- Public Member Functions inherited from sparrow::array_bitmap_base_impl< D, true >
constexpr auto insert_bitmap (const_bitmap_iterator pos, InputIt first, InputIt last) -> bitmap_iterator is_mutable
 
constexpr auto insert_bitmap (const_bitmap_iterator pos, InputIt first, InputIt last) -> bitmap_iterator is_mutable
 

Friends

class fixed_width_binary_reference< self_type >
 

Additional Inherited Members

- Protected Member Functions inherited from sparrow::array_bitmap_base_impl< D, true >
 array_bitmap_base_impl (arrow_proxy proxy)
 Constructs array bitmap base from Arrow proxy.
 
constexpr array_bitmap_base_impl (const array_bitmap_base_impl &)
 Copy constructor.
 
constexpr array_bitmap_base_imploperator= (const array_bitmap_base_impl &)
 Copy assignment operator.
 
constexpr array_bitmap_base_impl (array_bitmap_base_impl &&) noexcept=default
 
constexpr array_bitmap_base_imploperator= (array_bitmap_base_impl &&) noexcept=default
 
constexpr bitmap_typeget_bitmap ()
 Gets mutable reference to the validity bitmap.
 
constexpr const bitmap_typeget_bitmap () const
 Gets const reference to the validity bitmap.
 
constexpr void resize_bitmap (size_type new_length, bool value)
 Resizes the validity bitmap to accommodate new array length.
 
constexpr bitmap_iterator insert_bitmap (const_bitmap_iterator pos, bool value, size_type count)
 Inserts validity bits at specified position.
 
constexpr bitmap_iterator insert_bitmap (const_bitmap_iterator pos, InputIt first, InputIt last) is_mutable
 Inserts range of validity bits at specified position.
 
constexpr bitmap_iterator erase_bitmap (const_bitmap_iterator pos, size_type count)
 Erases validity bits starting at specified position.
 
constexpr void update ()
 Updates internal bitmap after external modifications to Arrow data.
 
constexpr non_owning_dynamic_bitset< uint8_t > get_non_owning_dynamic_bitset ()
 Gets non-owning view of the bitmap as dynamic bitset.
 
constexpr bitmap_type make_bitmap ()
 Creates bitmap wrapper from current Arrow validity buffer.
 
 array_bitmap_base_impl (arrow_proxy proxy)
 Constructs array bitmap base from Arrow proxy.
 
constexpr array_bitmap_base_impl (const array_bitmap_base_impl &)
 Copy constructor.
 
constexpr array_bitmap_base_impl (array_bitmap_base_impl &&) noexcept=default
 
constexpr array_bitmap_base_imploperator= (const array_bitmap_base_impl &)
 Copy assignment operator.
 
constexpr array_bitmap_base_imploperator= (array_bitmap_base_impl &&) noexcept=default
 
constexpr bitmap_typeget_bitmap ()
 Gets mutable reference to the validity bitmap.
 
constexpr const bitmap_typeget_bitmap () const
 Gets const reference to the validity bitmap.
 
constexpr void resize_bitmap (size_type new_length, bool value)
 Resizes the validity bitmap to accommodate new array length.
 
constexpr bitmap_iterator insert_bitmap (const_bitmap_iterator pos, bool value, size_type count)
 Inserts validity bits at specified position.
 
constexpr bitmap_iterator insert_bitmap (const_bitmap_iterator pos, InputIt first, InputIt last) is_mutable
 Inserts range of validity bits at specified position.
 
constexpr bitmap_iterator erase_bitmap (const_bitmap_iterator pos, size_type count)
 Erases validity bits starting at specified position.
 
constexpr void update ()
 Updates internal bitmap after external modifications to Arrow data.
 
constexpr non_owning_dynamic_bitset< uint8_t > get_non_owning_dynamic_bitset ()
 Gets non-owning view of the bitmap as dynamic bitset.
 
constexpr bitmap_type make_bitmap ()
 Creates bitmap wrapper from current Arrow validity buffer.
 

Detailed Description

template<std::ranges::sized_range T, class CR>
class sparrow::fixed_width_binary_array_impl< T, CR >

Definition at line 122 of file fixed_width_binary_array.hpp.

Member Typedef Documentation

◆ base_type

◆ bitmap_const_reference

◆ bitmap_reference

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::bitmap_reference = typename base_type::bitmap_reference

◆ bitmap_type

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::bitmap_type = typename base_type::bitmap_type

Definition at line 142 of file fixed_width_binary_array.hpp.

◆ const_bitmap_range

◆ const_data_iterator

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::const_data_iterator = typename inner_types::const_data_iterator

◆ const_functor_type

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::const_functor_type = typename inner_types::const_functor_type

◆ const_reference

◆ const_value_iterator

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::const_value_iterator = typename inner_types::const_value_iterator

◆ data_iterator

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::data_iterator = typename inner_types::data_iterator

◆ data_value_type

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::data_value_type = typename inner_types::data_value_type

◆ difference_type

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::difference_type = typename base_type::difference_type

Definition at line 152 of file fixed_width_binary_array.hpp.

◆ functor_type

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::functor_type = typename inner_types::functor_type

◆ inner_const_reference

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::inner_const_reference = typename inner_types::inner_const_reference

◆ inner_reference

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::inner_reference = typename inner_types::inner_reference

◆ inner_types

◆ inner_value_type

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::inner_value_type = typename inner_types::inner_value_type

◆ iterator_tag

◆ reference

◆ self_type

◆ size_type

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::size_type = typename base_type::size_type

Definition at line 151 of file fixed_width_binary_array.hpp.

◆ value_iterator

template<std::ranges::sized_range T, class CR>
using sparrow::fixed_width_binary_array_impl< T, CR >::value_iterator = typename inner_types::value_iterator

Definition at line 159 of file fixed_width_binary_array.hpp.

◆ value_type

Constructor & Destructor Documentation

◆ fixed_width_binary_array_impl() [1/2]

template<std::ranges::sized_range T, class CR>
sparrow::fixed_width_binary_array_impl< T, CR >::fixed_width_binary_array_impl ( arrow_proxy proxy)
explicit

Constructs fixed-width binary array from Arrow proxy.

Parameters
proxyArrow proxy containing fixed-width binary array data and schema
Precondition
proxy must contain valid Arrow Fixed Width Binary array and schema
proxy format must be "w:[size]" where [size] is the element byte size
proxy data type must be FIXED_WIDTH_BINARY
Postcondition
Array is initialized with data from proxy
Element size is extracted from format string
Note
Internal assertion: SPARROW_ASSERT_TRUE(proxy.data_type() == data_type::FIXED_WIDTH_BINARY)
Examples
/home/runner/work/sparrow/sparrow/include/sparrow/layout/fixed_width_binary_layout/fixed_width_binary_array.hpp.

Definition at line 612 of file fixed_width_binary_array.hpp.

Here is the call graph for this function:

◆ fixed_width_binary_array_impl() [2/2]

template<std::ranges::sized_range T, class CR>
template<class... ARGS>
requires (mpl::excludes_copy_and_move_ctor_v<fixed_width_binary_array_impl<T, CR>, ARGS...>)
sparrow::fixed_width_binary_array_impl< T, CR >::fixed_width_binary_array_impl ( ARGS &&... args)
inline

Generic constructor for creating fixed-width binary array.

Creates a fixed-width binary array from various input types. The arguments are forwarded to compatible create_proxy() functions based on their types.

Template Parameters
ARGSParameter pack for constructor arguments
Parameters
argsConstructor arguments (data, element_size, validity, metadata, etc.)
Precondition
Arguments must match one of the create_proxy() overload signatures
If providing data ranges, all elements must have the same size
Element size must be > 0 for non-empty arrays
Postcondition
Array is created with the specified data and configuration
Element size is properly set and encoded in format string

Definition at line 197 of file fixed_width_binary_array.hpp.

Member Function Documentation

◆ create_proxy() [1/3]

template<std::ranges::sized_range T, class CR>
template<std::ranges::input_range NULLABLE_RANGE, input_metadata_container METADATA_RANGE>
requires mpl::is_type_instance_of_v<std::ranges::range_value_t<NULLABLE_RANGE>, nullable> && std::ranges::input_range<typename std::ranges::range_value_t<NULLABLE_RANGE>::value_type> && std::is_same_v< std::ranges::range_value_t<typename std::ranges::range_value_t<NULLABLE_RANGE>::value_type>, byte_t>
arrow_proxy sparrow::fixed_width_binary_array_impl< T, CR >::create_proxy ( NULLABLE_RANGE && range,
std::optional< std::string_view > name,
std::optional< METADATA_RANGE > metadata )

Definition at line 738 of file fixed_width_binary_array.hpp.

◆ create_proxy() [2/3]

template<std::ranges::sized_range T, class CR>
template<std::ranges::input_range R, input_metadata_container METADATA_RANGE>
requires ( std::ranges::input_range<std::ranges::range_value_t<R>> && // a range of ranges mpl::char_like<std::ranges::range_value_t<std::ranges::range_value_t<R>>> // inner range is a // range of char-like )
arrow_proxy sparrow::fixed_width_binary_array_impl< T, CR >::create_proxy ( R && values,
bool nullable,
std::optional< std::string_view > name,
std::optional< METADATA_RANGE > metadata )

Definition at line 701 of file fixed_width_binary_array.hpp.

◆ create_proxy() [3/3]

template<std::ranges::sized_range T, class CR>
template<std::ranges::input_range R, validity_bitmap_input VB, input_metadata_container METADATA_RANGE>
requires ( std::ranges::input_range<std::ranges::range_value_t<R>> && // a range of ranges mpl::char_like<std::ranges::range_value_t<std::ranges::range_value_t<R>>> // inner range is a // range of char-like )
arrow_proxy sparrow::fixed_width_binary_array_impl< T, CR >::create_proxy ( R && values,
VB && validity_input,
std::optional< std::string_view > name,
std::optional< METADATA_RANGE > metadata )

Definition at line 670 of file fixed_width_binary_array.hpp.

◆ insert_value()

template<std::ranges::sized_range T, class CR>
template<std::ranges::sized_range U>
requires mpl::convertible_ranges<U, T>
auto sparrow::fixed_width_binary_array_impl< T, CR >::insert_value ( const_value_iterator pos,
U value,
size_type count ) -> value_iterator
constexpr

Definition at line 911 of file fixed_width_binary_array.hpp.

◆ insert_values()

template<std::ranges::sized_range T, class CR>
template<typename InputIt>
requires std::input_iterator<InputIt> && mpl::convertible_ranges<typename std::iterator_traits<InputIt>::value_type, T>
auto sparrow::fixed_width_binary_array_impl< T, CR >::insert_values ( const_value_iterator pos,
InputIt first,
InputIt last ) -> value_iterator
constexpr

Definition at line 934 of file fixed_width_binary_array.hpp.

◆ value() [1/2]

template<std::ranges::sized_range T, class CR>
auto sparrow::fixed_width_binary_array_impl< T, CR >::value ( size_type i)
nodiscardconstexpr

Gets mutable reference to element at specified index.

Parameters
iIndex of the element to access
Returns
Mutable reference to the binary element
Precondition
i must be < size()
Postcondition
Returns valid reference that can modify the element
Note
Internal assertion: SPARROW_ASSERT_TRUE(i < size())
Examples
/home/runner/work/sparrow/sparrow/include/sparrow/layout/fixed_width_binary_layout/fixed_width_binary_array.hpp.

Definition at line 846 of file fixed_width_binary_array.hpp.

◆ value() [2/2]

template<std::ranges::sized_range T, class CR>
auto sparrow::fixed_width_binary_array_impl< T, CR >::value ( size_type i) const
nodiscardconstexpr

Gets const reference to element at specified index.

Parameters
iIndex of the element to access
Returns
Const reference to the binary element
Precondition
i must be < size()
Postcondition
Returns valid const reference to the element data
Note
Internal assertion: SPARROW_ASSERT_TRUE(i < size())

Definition at line 853 of file fixed_width_binary_array.hpp.

Friends And Related Symbol Documentation

◆ fixed_width_binary_reference< self_type >

template<std::ranges::sized_range T, class CR>
friend class fixed_width_binary_reference< self_type >
friend

Definition at line 598 of file fixed_width_binary_array.hpp.


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