字典类#
- group Dictionary
类型定义
-
using dictionary32 = dictionary_wrapper<int32_t>#
32位整数索引字典包装器
函数
-
template<typename Integer>
inline bool operator==(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# 用于 dictionary_wrapper 的相等运算符。
- 模板参数:
Integer – 索引类型
- 参数:
lhs – 比较的左侧
rhs – 比较的右侧
- 返回值:
如果 lhs 等于 rhs 则返回 true,否则返回 false
-
template<typename Integer>
inline bool operator!=(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# 用于 dictionary_wrapper 的不等运算符。
- 模板参数:
Integer – 索引类型
- 参数:
lhs – 比较的左侧
rhs – 比较的右侧
- 返回值:
如果 lhs 不等于 rhs 则返回 true,否则返回 false
-
template<typename Integer>
inline bool operator<=(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# 用于 dictionary_wrapper 的小于等于运算符。
- 模板参数:
Integer – 索引类型
- 参数:
lhs – 比较的左侧
rhs – 比较的右侧
- 返回值:
如果 lhs 小于等于 rhs 则返回 true,否则返回 false
-
template<typename Integer>
inline bool operator>=(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# 用于 dictionary_wrapper 的大于等于运算符。
- 模板参数:
Integer – 索引类型
- 参数:
lhs – 比较的左侧
rhs – 比较的右侧
- 返回值:
如果 lhs 大于等于 rhs 则返回 true,否则返回 false
-
template<typename Integer>
inline constexpr bool operator<(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# 用于 dictionary_wrapper 的小于运算符。
- 模板参数:
Integer – 索引类型
- 参数:
lhs – 比较的左侧
rhs – 比较的右侧
- 返回值:
如果 lhs 小于 rhs 则返回 true,否则返回 false
-
template<typename Integer>
inline bool operator>(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)# 用于 dictionary_wrapper 的大于运算符。
- 模板参数:
Integer – 索引类型
- 参数:
lhs – 比较的左侧
rhs – 比较的右侧
- 返回值:
如果 lhs 大于 rhs 则返回 true,否则返回 false
-
class dictionary_column_view : private cudf::column_view#
- #include <dictionary_column_view.hpp>
用于对字典列进行操作的包装器类。
字典列包含一组键列和索引列。键列是该列的排序后的唯一值集合。索引表示每个元素的值在键列中的对应位置。
公共函数
-
dictionary_column_view(column_view const &dictionary_column)#
从 column view 构造新的 dictionary column view 对象。
- 参数:
dictionary_column – 要包装的 column view
-
dictionary_column_view(dictionary_column_view&&) = default#
移动构造函数。
-
dictionary_column_view(dictionary_column_view const&) = default#
拷贝构造函数。
-
dictionary_column_view &operator=(dictionary_column_view const&) = default#
移动赋值运算符。
- 返回值:
对此字典列的引用
-
dictionary_column_view &operator=(dictionary_column_view&&) = default#
拷贝赋值运算符。
- 返回值:
对此字典列的引用
-
column_view parent() const noexcept#
返回父列。
- 返回值:
父列
-
column_view indices() const noexcept#
返回索引列。
- 返回值:
索引列
-
column_view get_indices_annotated() const noexcept#
返回一个 column_view,它结合了索引数据以及来自父级的偏移量、大小和空值信息。
- 返回值:
一个带有父级空值的切片索引列视图
-
column_view keys() const noexcept#
返回键列。
- 返回值:
键列
-
data_type keys_type() const noexcept#
返回键子列的 cudf::data_type。
- 返回值:
键子列的 cudf::data_type
-
dictionary_column_view(column_view const &dictionary_column)#
-
template<typename IndexType>
struct dictionary_wrapper# - #include <dictionary.hpp>
用于 DICTIONARY 类型列中索引的强类型包装器。
IndexType 将是 int32_t 等整数类型。
例如,
dictionary32
是围绕一个持有特定元素在字典键中的偏移量的int32_t
值的强类型包装器。此包装器为 IndexType 提供了常见的转换和比较操作。
公共函数
-
dictionary_wrapper(dictionary_wrapper&&) = default#
移动构造函数。
-
dictionary_wrapper(dictionary_wrapper const&) = default#
拷贝构造函数。
-
dictionary_wrapper &operator=(dictionary_wrapper&&) = default#
移动赋值运算符。
- 返回值:
对此字典包装器对象的引用
-
dictionary_wrapper &operator=(dictionary_wrapper const&) = default#
拷贝赋值运算符。
- 返回值:
对此字典包装器对象的引用
-
inline explicit constexpr dictionary_wrapper(value_type v)#
从值构造 dictionary_wrapper。
- 参数:
v – 用于构造 dictionary_wrapper 的值
-
inline explicit operator value_type() const#
转换运算符。
- 返回值:
此字典包装器的值
-
inline value_type value() const#
简单的访问器。
- 返回值:
此字典包装器的值
公共静态函数
-
static inline constexpr value_type max_value()#
返回值类型的最大值。
- 返回值:
值类型的最大值
-
static inline constexpr value_type min_value()#
返回值类型的最小值。
- 返回值:
值类型的最小值
-
static inline constexpr value_type lowest_value()#
返回值类型的最低值。
- 返回值:
值类型的最低值
-
dictionary_wrapper(dictionary_wrapper&&) = default#
-
using dictionary32 = dictionary_wrapper<int32_t>#