公共成员函数 | 所有成员列表
cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT > 类模板参考

column_wrapper 派生类,用于包装固定宽度元素的列。 更多...

#include <column_wrapper.hpp>

cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT > 的继承图
cudf::test::detail::column_wrapper

公共成员函数

 fixed_width_column_wrapper ()
 默认构造函数初始化具有适当 dtype 的空列。
 
template<typename InputIterator >
 fixed_width_column_wrapper (InputIterator begin, InputIterator end)
 构造一个包含范围 [begin,end) 中固定宽度元素的非可空列。 更多...
 
template<typename InputIterator , typename ValidityIterator >
 fixed_width_column_wrapper (InputIterator begin, InputIterator end, ValidityIterator v)
 使用范围 [v, v + distance(begin,end)) 中解释为布尔值以指示每个元素有效性的范围,构造一个包含范围 [begin,end) 中固定宽度元素的可空列。 更多...
 
template<typename ElementFrom >
 fixed_width_column_wrapper (std::initializer_list< ElementFrom > elements)
 从初始化列表构造一个非可空固定宽度元素列。 更多...
 
template<typename ElementFrom >
 fixed_width_column_wrapper (std::initializer_list< ElementFrom > elements, std::initializer_list< bool > validity)
 从固定宽度元素列表构造一个可空列,使用另一个列表指示每个元素的有效性。 更多...
 
template<typename ValidityIterator , typename ElementFrom >
 fixed_width_column_wrapper (std::initializer_list< ElementFrom > element_list, ValidityIterator v)
 从固定宽度元素列表和范围 [v, v + element_list.size()) 中解释为布尔值以指示每个元素有效性的范围构造一个可空列。 更多...
 
template<typename InputIterator >
 fixed_width_column_wrapper (InputIterator begin, InputIterator end, std::initializer_list< bool > const &validity)
 使用有效性初始化列表指示每个元素的有效性,构造包含范围 [begin,end) 中固定宽度元素的可空列。 更多...
 
template<typename ElementFrom >
 fixed_width_column_wrapper (std::initializer_list< std::pair< ElementFrom, bool >> elements)
 从固定宽度元素对列表和每个元素的有效性布尔值构造一个可空列。 更多...
 
- 继承自 cudf::test::detail::column_wrapper 的公共成员函数
 operator column_view () const
 column_view 的隐式转换运算符。 更多...
 
 operator mutable_column_view ()
 mutable_column_view 的隐式转换运算符。 更多...
 
std::unique_ptr< cudf::columnrelease ()
 释放指向包装列的内部 unique_ptr。 更多...
 

其他继承成员

- 继承自 cudf::test::detail::column_wrapper 的保护属性
std::unique_ptr< cudf::columnwrapped {}
 包装的列。
 

详细描述

template<typename ElementTo, typename SourceElementT = ElementTo>
class cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT >

column_wrapper 派生类,用于包装固定宽度元素的列。

模板参数
ElementTo创建的固定宽度元素类型
SourceElementT用于创建 ElementTo 类型元素的固定宽度元素类型

定义于文件 column_wrapper.hpp 的第 340 行。

构造函数与析构函数文档

◆ fixed_width_column_wrapper() [1/7]

template<typename ElementTo , typename SourceElementT = ElementTo>
template<typename InputIterator >
cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT >::fixed_width_column_wrapper ( InputIterator  begin,
InputIterator  end 
)
inline

构造一个包含范围 [begin,end) 中固定宽度元素的非可空列。

示例

// 创建一个包含 5 个元素的 INT32 非可空列: {0, 2, 4, 6, 8}
auto elements = make_counting_transform_iterator(0, [](auto i){return i*2;});
fixed_width_column_wrapper<int32_t> w(elements, elements + 5);

注意:与 std::vector 类似,此“范围”构造函数应使用括号 () 而非花括号 {}。花括号仅应用于 initializer_list 构造函数

参数
begin元素序列的起始位置
end元素序列的结束位置

定义于文件 column_wrapper.hpp 的第 375 行。

◆ fixed_width_column_wrapper() [2/7]

template<typename ElementTo , typename SourceElementT = ElementTo>
template<typename InputIterator , typename ValidityIterator >
cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT >::fixed_width_column_wrapper ( InputIterator  begin,
InputIterator  end,
ValidityIterator  v 
)
inline

使用范围 [v, v + distance(begin,end)) 中解释为布尔值以指示每个元素有效性的范围,构造一个包含范围 [begin,end) 中固定宽度元素的可空列。

如果 v[i] == true,则元素 i 有效,否则为 null。

示例

// 创建一个包含 5 个元素的 INT32 可空列: {null, 1, null, 3, null}
auto elements = make_counting_transform_iterator(0, [](auto i){return i;});
auto validity = make_counting_transform_iterator(0, [](auto i){return i%2;})
fixed_width_column_wrapper<int32_t> w(elements, elements + 5, validity);

注意:与 std::vector 类似,此“范围”构造函数应使用括号 () 而非花括号 {}。花括号仅应用于 initializer_list 构造函数

参数
begin元素序列的起始位置
end元素序列的结束位置
v有效性指示器序列的起始位置

定义于文件 column_wrapper.hpp 的第 409 行。

◆ fixed_width_column_wrapper() [3/7]

template<typename ElementTo , typename SourceElementT = ElementTo>
template<typename ElementFrom >
cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT >::fixed_width_column_wrapper ( std::initializer_list< ElementFrom >  elements)
inline

从初始化列表构造一个非可空固定宽度元素列。

示例

// 创建一个包含 4 个元素的 INT32 非可空列: {1, 2, 3, 4}
fixed_width_column_wrapper<int32_t> w{{1, 2, 3, 4}};
参数
elements元素列表

定义于文件 column_wrapper.hpp 的第 434 行。

◆ fixed_width_column_wrapper() [4/7]

template<typename ElementTo , typename SourceElementT = ElementTo>
template<typename ElementFrom >
cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT >::fixed_width_column_wrapper ( std::initializer_list< ElementFrom >  elements,
std::initializer_list< bool >  validity 
)
inline

从固定宽度元素列表构造一个可空列,使用另一个列表指示每个元素的有效性。

每个元素的有效性由布尔值的 initializer_list 确定,其中 true 表示元素有效,false 表示元素为 null。

示例

// 创建一个包含 4 个元素的 INT32 可空列: {1, NULL, 3, NULL}
fixed_width_column_wrapper<int32_t> w{ {1,2,3,4}, {1, 0, 1, 0}};
参数
elements元素列表
validity有效性指示器布尔值列表

定义于文件 column_wrapper.hpp 的第 457 行。

◆ fixed_width_column_wrapper() [5/7]

template<typename ElementTo , typename SourceElementT = ElementTo>
template<typename ValidityIterator , typename ElementFrom >
cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT >::fixed_width_column_wrapper ( std::initializer_list< ElementFrom >  element_list,
ValidityIterator  v 
)
inline

从固定宽度元素列表和范围 [v, v + element_list.size()) 中解释为布尔值以指示每个元素有效性的范围构造一个可空列。

示例

// 创建一个包含 4 个元素的 INT32 可空列: {NULL, 1, NULL, 3}
auto validity = make_counting_transform_iterator(0, [](auto i){return i%2;})
fixed_width_column_wrapper<int32_t> w{ {1,2,3,4}, validity}
模板参数
ValidityIterator解引用 ValidityIterator 必须可转换为 bool
参数
element_list元素列表
v有效性指示器序列的起始位置

定义于文件 column_wrapper.hpp 的第 481 行。

◆ fixed_width_column_wrapper() [6/7]

template<typename ElementTo , typename SourceElementT = ElementTo>
template<typename InputIterator >
cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT >::fixed_width_column_wrapper ( InputIterator  begin,
InputIterator  end,
std::initializer_list< bool > const &  validity 
)
inline

使用有效性初始化列表指示每个元素的有效性,构造包含范围 [begin,end) 中固定宽度元素的可空列。

每个元素的有效性由布尔值的 initializer_list 确定,其中 true 表示元素有效,false 表示元素为 null。

示例

// 创建一个包含 5 个元素的 INT32 可空列: {null, 1, null, 3, null}
fixed_width_column_wrapper<int32_t> w(elements, elements + 5, {0, 1, 0, 1, 0});
参数
begin元素序列的起始位置
end元素序列的结束位置
validity有效性指示器布尔值列表

定义于文件 column_wrapper.hpp 的第 505 行。

◆ fixed_width_column_wrapper() [7/7]

template<typename ElementTo , typename SourceElementT = ElementTo>
template<typename ElementFrom >
cudf::test::fixed_width_column_wrapper< ElementTo, SourceElementT >::fixed_width_column_wrapper ( std::initializer_list< std::pair< ElementFrom, bool >>  elements)
inline

从固定宽度元素对列表和每个元素的有效性布尔值构造一个可空列。

每个元素的有效性由对中的布尔元素确定,其中 true 表示元素有效,false 表示元素为 null。

示例

// 创建一个包含 4 个元素的 INT32 可空列: {1, NULL, 3, NULL}
using p = std::pair<int32_t, bool>;
fixed_width_column_wrapper<int32_t> w( p{1, true}, p{2, false}, p{3, true}, p{4, false} );
参数
elements元素和有效性布尔值对列表

定义于文件 column_wrapper.hpp 的第 530 行。


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