公共成员函数 | 所有成员列表
cudf::row_lexicographic_comparator< Nullate > 类模板参考

计算一行是否在字典序上小于另一行。 更多...

公共成员函数

 row_lexicographic_comparator (Nullate has_nulls, table_device_view lhs, table_device_view rhs, order const *column_order=nullptr, null_order const *null_precedence=nullptr)
 构造一个函数对象,用于对两个表的行执行字典序比较。 更多...
 
bool operator() (size_type lhs_index, size_type rhs_index) const noexcept
 检查 lhs 表中位于 lhs_index 的行是否在字典序上小于 rhs 表中位于 rhs_index 的行。 更多...
 

详细描述

template<typename Nullate>
class cudf::row_lexicographic_comparator< Nullate >

计算一行是否在字典序上小于另一行。

字典序的判定规则:

字典序完全等同于对两个单词进行字母排序,例如,aac 在字典序上小于(或位于 abb 之前)。两个单词中的第二个字母是第一个不同的字母,并且 a < b,因此 aac < abb

模板参数
Nullate一个 cudf::nullate 类型,描述如何检查空值。

定义于文件 row_operators.cuh第 377 行

构造函数和析构函数文档

◆ row_lexicographic_comparator()

template<typename Nullate >
cudf::row_lexicographic_comparator< Nullate >::row_lexicographic_comparator ( Nullate  has_nulls,
table_device_view  lhs,
table_device_view  rhs,
order const *  column_order = nullptr,
null_order const *  null_precedence = nullptr 
)
inline

构造一个函数对象,用于对两个表的行执行字典序比较。

如果使用不可比较的列类型调用,则行为是未定义的。

异常
cudf::logic_error如果 lhs.num_columns() != rhs.num_columns()
参数
has_nulls指示任一输入表是否包含带空值的列。
lhs第一个表
rhs第二个表(可能与 lhs 是同一个表)
column_order可选参数,与行长度相同的设备数组,指示行中每列所需的升序/降序排列。如果为 nullptr,则假定所有列都按升序排列。
null_precedence可选参数,与行长度相同的设备数组,指示每列中空值与其他所有值如何比较。如果为 nullptr,则所有列的空值优先级将是 null_order::BEFORE

定义于文件 row_operators.cuh第 398 行

成员函数文档

◆ operator()()

template<typename Nullate >
bool cudf::row_lexicographic_comparator< Nullate >::operator() ( size_type  lhs_index,
size_type  rhs_index 
) const
inlinenoexcept

检查 lhs 表中位于 lhs_index 的行是否在字典序上小于 rhs 表中位于 rhs_index 的行。

参数
lhs_index要检查的 lhs 表中的行索引
rhs_index要检查的 rhs 表中的行索引
返回值
如果 lhs 表中的行小于 rhs 表中的行,则为 true

定义于文件 row_operators.cuh第 421 行


此类的文档生成自以下文件