字典类#

group dictionary_classes

类型定义

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

Template Parameters:

整数 – 索引类型

Parameters:
  • lhs – 比较的左侧

  • rhs – 比较的右侧

Returns:

如果 lhs 等于 rhs 则返回 true,否则返回 false

template<typename Integer>
inline bool operator!=(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)#

不等于操作符用于 dictionary_wrapper

Template Parameters:

整数 – 索引类型

Parameters:
  • lhs – 比较的左侧

  • rhs – 比较的右侧

Returns:

如果 lhs 不等于 rhs 则返回 true,否则返回 false

template<typename Integer>
inline bool operator<=(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)#

小于或等于操作符用于 dictionary_wrapper

Template Parameters:

整数 – 索引类型

Parameters:
  • lhs – 比较的左侧

  • rhs – 比较的右侧

Returns:

如果 lhs 小于或等于 rhs 则返回 true,否则返回 false

template<typename Integer>
inline bool operator>=(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)#

大于或等于操作符用于 dictionary_wrapper

Template Parameters:

整数 – 索引类型

Parameters:
  • lhs – 比较的左侧

  • rhs – 比较的右侧

Returns:

如果 lhs 大于或等于 rhs,则返回 true,否则返回 false

template<typename Integer>
inline constexpr bool operator<(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)#

小于操作符用于 dictionary_wrapper

Template Parameters:

整数 – 索引类型

Parameters:
  • lhs – 比较的左侧

  • rhs – 比较的右侧

Returns:

如果 lhs 小于 rhs 则返回 true,否则返回 false

template<typename Integer>
inline bool operator>(dictionary_wrapper<Integer> const &lhs, dictionary_wrapper<Integer> const &rhs)#

大于操作符用于 dictionary_wrapper

Template Parameters:

整数 – 索引类型

Parameters:
  • lhs – 比较的左侧

  • rhs – 比较的右侧

Returns:

如果 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)#

从列视图构造一个新的字典列视图对象。

Parameters:

dictionary_column – 要包装的列视图

dictionary_column_view(dictionary_column_view&&) = default#

移动构造函数。

dictionary_column_view(dictionary_column_view const&) = default#

复制构造函数。

dictionary_column_view &operator=(dictionary_column_view const&) = default#

移动赋值运算符。

Returns:

对此字典列的引用

dictionary_column_view &operator=(dictionary_column_view&&) = default#

复制赋值运算符。

Returns:

对此字典列的引用

column_view parent() const noexcept#

返回父列。

Returns:

父列

column_view indices() const noexcept#

返回索引列。

Returns:

索引列

column_view get_indices_annotated() const noexcept#

返回一个column_view,将索引数据与父级的偏移量、大小和空值结合。

Returns:

从父级获取的带有空值的切片索引列视图

column_view keys() const noexcept#

返回键的列。

Returns:

键列

data_type keys_type() const noexcept#

返回键子列的cudf::data_type

Returns:

键子列的 cudf::data_type

size_type keys_size() const noexcept#

返回键列中的行数。

Returns:

键列中的行数

公共静态属性

static constexpr size_type indices_column_index = {0}#

字典列的索引列的索引。

static constexpr size_type keys_column_index = {1}#

字典列的键列的索引。

template<typename IndexType>
struct dictionary_wrapper#
#include <dictionary.hpp>

用于DICTIONARY类型列中索引的强类型包装器。

IndexType 将是整数类型,如 int32_t。

例如,dictionary32 是一个围绕 int32_t 值的强类型包装器,它保存了特定元素的字典键的偏移量。

此包装器为IndexType提供了常见的转换和比较操作。

公共类型

using value_type = IndexType#

字典的基础类型。

公共函数

dictionary_wrapper(dictionary_wrapper&&) = default#

移动构造函数。

dictionary_wrapper(dictionary_wrapper const&) = default#

复制构造函数。

dictionary_wrapper &operator=(dictionary_wrapper&&) = default#

移动赋值运算符。

Returns:

对此字典包装对象的引用

dictionary_wrapper &operator=(dictionary_wrapper const&) = default#

复制赋值运算符。

Returns:

对此字典包装对象的引用

inline explicit constexpr dictionary_wrapper(value_type v)#

从值构造 dictionary_wrapper

Parameters:

v – 用于构建 dictionary_wrapper 的值

inline explicit operator value_type() const#

转换操作符。

Returns:

这个字典包装器的值

inline value_type value() const#

简单的访问器。

Returns:

这个字典包装器的值

公共静态函数

static inline constexpr value_type max_value()#

返回该值类型的最大值。

Returns:

值类型的最大值

static inline constexpr value_type min_value()#

返回值类型的最小值。

Returns:

值类型的最小值

static inline constexpr value_type lowest_value()#

返回该值类型的最小值。

Returns:

值类型的最小值