Dictionary Classes#
- group dictionary_classes
Typedefs
-
using dictionary32 = dictionary_wrapper<int32_t>#
32-bit integer indexed dictionary wrapper
Functions
-
template<typename Integer>
inline bool operator==(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# Wqual to operator for dictionary_wrapper.
- Template Parameters:
Integer – Index type
- Parameters:
lhs – Left hand side of comparison
rhs – Right hand side of comparison
- Returns:
Returns true if lhs is equal to rhs, false otherwise
-
template<typename Integer>
inline bool operator!=(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# Not equal to operator for dictionary_wrapper.
- Template Parameters:
Integer – Index type
- Parameters:
lhs – Left hand side of comparison
rhs – Right hand side of comparison
- Returns:
Returns true if lhs is not equal to rhs, false otherwise
-
template<typename Integer>
inline bool operator<=(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# Less than or equal to operator for dictionary_wrapper.
- Template Parameters:
Integer – Index type
- Parameters:
lhs – Left hand side of comparison
rhs – Right hand side of comparison
- Returns:
Returns true if lhs is less than or equal to rhs, false otherwise
-
template<typename Integer>
inline bool operator>=(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# Greater than or equal to operator for dictionary_wrapper.
- Template Parameters:
Integer – Index type
- Parameters:
lhs – Left hand side of comparison
rhs – Right hand side of comparison
- Returns:
Returns true if lhs is greater than or equal to rhs, false otherwise
-
template<typename Integer>
inline constexpr bool operator<(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# Less than operator for dictionary_wrapper.
- Template Parameters:
Integer – Index type
- Parameters:
lhs – Left hand side of comparison
rhs – Right hand side of comparison
- Returns:
Returns true if lhs is less than rhs, false otherwise
-
template<typename Integer>
inline bool operator>(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# Greater than operator for dictionary_wrapper.
- Template Parameters:
Integer – Index type
- Parameters:
lhs – Left hand side of comparison
rhs – Right hand side of comparison
- Returns:
Returns true if lhs is greater than rhs, false otherwise
-
class dictionary_column_view : private cudf::column_view#
- #include <dictionary_column_view.hpp>
A wrapper class for operations on a dictionary column.
A dictionary column contains a set of keys and a column of indices. The keys are a sorted set of unique values for the column. The indices represent the corresponding positions of each element’s value in the keys.
Public Functions
-
dictionary_column_view(column_view const &dictionary_column)#
Construct a new dictionary column view object from a column view.
- Parameters:
dictionary_column – The column view to wrap
-
dictionary_column_view(dictionary_column_view&&) = default#
Move constructor.
-
dictionary_column_view(dictionary_column_view const&) = default#
Copy constructor.
-
dictionary_column_view &operator=(dictionary_column_view const&) = default#
Move assignment operator.
- Returns:
The reference to this dictionary column
-
dictionary_column_view &operator=(dictionary_column_view&&) = default#
Copy assignment operator.
- Returns:
The reference to this dictionary column
-
column_view parent() const noexcept#
Returns the parent column.
- Returns:
The parent column
-
column_view indices() const noexcept#
Returns the column of indices.
- Returns:
The indices column
-
column_view get_indices_annotated() const noexcept#
Returns a column_view combining the indices data with offset, size, and nulls from the parent.
- Returns:
A sliced indices column view with nulls from the parent
-
column_view keys() const noexcept#
Returns the column of keys.
- Returns:
The keys column
-
data_type keys_type() const noexcept#
Returns the cudf::data_type of the keys child column.
- Returns:
The cudf::data_type of the keys child column
-
dictionary_column_view(column_view const &dictionary_column)#
-
template<typename IndexType>
struct dictionary_wrapper# - #include <dictionary.hpp>
A strongly typed wrapper for indices in a DICTIONARY type column.
IndexType will be integer types like int32_t.
For example,
dictionary32
is a strongly typed wrapper around anint32_t
value that holds the offset into the dictionary keys for a specific element.This wrapper provides common conversion and comparison operations for the IndexType.
Public Functions
-
dictionary_wrapper(dictionary_wrapper&&) = default#
Move constructor.
-
dictionary_wrapper(dictionary_wrapper const&) = default#
Copy constructor.
-
dictionary_wrapper &operator=(dictionary_wrapper&&) = default#
Move assignment operator.
- Returns:
The reference to this dictionary wrapper object
-
dictionary_wrapper &operator=(dictionary_wrapper const&) = default#
Copy assignment operator.
- Returns:
The reference to this dictionary wrapper object
-
inline explicit constexpr dictionary_wrapper(value_type v)#
Construct dictionary_wrapper from a value.
- Parameters:
v – The value to construct the dictionary_wrapper from
-
inline explicit operator value_type() const#
Conversion operator.
- Returns:
The value of this dictionary wrapper
-
inline value_type value() const#
Simple accessor.
- Returns:
The value of this dictionary wrapper
Public Static Functions
-
static inline constexpr value_type max_value()#
Returns the maximum value of the value type.
- Returns:
The maximum value of the value type
-
static inline constexpr value_type min_value()#
Returns the minimum value of the value type.
- Returns:
The minimum value of the value type
-
static inline constexpr value_type lowest_value()#
Returns the lowest value of the value type.
- Returns:
The lowest value of the value type
-
dictionary_wrapper(dictionary_wrapper&&) = default#
-
using dictionary32 = dictionary_wrapper<int32_t>#