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

固定宽度元素的列的包装器。 更多...

#include <column_wrapper.hpp>

cudf::test::fixed_point_column_wrapper< Rep > 的继承图
cudf::test::detail::column_wrapper

公共成员函数

template<typename FixedPointRepIterator >
 fixed_point_column_wrapper (FixedPointRepIterator begin, FixedPointRepIterator end, numeric::scale_type scale)
 构造一个包含范围 [begin,end) 中的小数元素的非可空列。 更多...
 
 fixed_point_column_wrapper (std::initializer_list< Rep > values, numeric::scale_type scale)
 从 initializer list 构造一个包含小数元素的非可空列。 更多...
 
template<typename FixedPointRepIterator , typename ValidityIterator >
 fixed_point_column_wrapper (FixedPointRepIterator begin, FixedPointRepIterator end, ValidityIterator v, numeric::scale_type scale)
 从范围构造一个包含定点元素的可空列。 更多...
 
 fixed_point_column_wrapper (std::initializer_list< Rep > elements, std::initializer_list< bool > validity, numeric::scale_type scale)
 使用另一个列表指示每个元素的有效性,从小数元素的 initializer list 构造一个可空列。 更多...
 
template<typename ValidityIterator >
 fixed_point_column_wrapper (std::initializer_list< Rep > element_list, ValidityIterator v, numeric::scale_type scale)
 从小数元素的 initializer list 和范围 [v, v + element_list.size()) 构造一个可空列,该范围被解释为布尔值以指示每个元素的有效性。 更多...
 
template<typename FixedPointRepIterator >
 fixed_point_column_wrapper (FixedPointRepIterator begin, FixedPointRepIterator end, std::initializer_list< bool > const &validity, numeric::scale_type scale)
 构造一个包含范围 [begin,end) 中的小数元素的可空列,使用有效性 initializer list 来指示每个元素的有效性。 更多...
 
- 继承自 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 Rep>
class cudf::test::fixed_point_column_wrapper< Rep >

固定宽度元素的列的包装器。

模板参数
Rep列的类型

定义于文件 column_wrapper.hpp547 行。

构造函数和析构函数文档

◆ fixed_point_column_wrapper() [1/6]

template<typename Rep >
template<typename FixedPointRepIterator >
cudf::test::fixed_point_column_wrapper< Rep >::fixed_point_column_wrapper ( FixedPointRepIterator  begin,
FixedPointRepIterator  end,
numeric::scale_type  scale 
)
inline

构造一个包含范围 [begin,end) 中的小数元素的非可空列。

示例

// 创建一个包含 5 个元素:{0, 2, 4, 6, 8} 的 DECIMAL32 非可空列
auto elements = make_counting_transform_iterator(0, [](auto i) { return i * 2;});
auto w = fixed_point_column_wrapper<int32_t>(elements, elements + 5, scale_type{0});
scale_type
定点的比例类型。
模板参数
FixedPointRepIteratorfixed_point::rep 的迭代器
参数
begin元素序列的开头
end元素序列的末尾
scale列中元素的比例

定义于文件 column_wrapper.hpp566 行。

◆ fixed_point_column_wrapper() [2/6]

template<typename Rep >
cudf::test::fixed_point_column_wrapper< Rep >::fixed_point_column_wrapper ( std::initializer_list< Rep >  values,
numeric::scale_type  scale 
)
inline

从 initializer list 构造一个包含小数元素的非可空列。

示例

// 创建一个包含 4 个元素:{42.0, 4.2, 0.4} 的非可空 `decimal32` 列
auto const col = fixed_point_column_wrapper<int32_t>{{420, 42, 4}, scale_type{-1}};
参数
values已移位值的 initializer list
scale列中元素的比例

定义于文件 column_wrapper.hpp598 行。

◆ fixed_point_column_wrapper() [3/6]

template<typename Rep >
template<typename FixedPointRepIterator , typename ValidityIterator >
cudf::test::fixed_point_column_wrapper< Rep >::fixed_point_column_wrapper ( FixedPointRepIterator  begin,
FixedPointRepIterator  end,
ValidityIterator  v,
numeric::scale_type  scale 
)
inline

从范围构造一个包含定点元素的可空列。

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

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

示例

// 创建一个包含 5 个元素:{null, 100, null, 300, null} 的 DECIMAL32 可空列
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_point_column_wrapper<int32_t> w(elements, elements + 5, validity, scale_type{2});

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

参数
begin元素序列的开头
end元素序列的末尾
v有效性指示器序列的开头
scale列中元素的比例

定义于文件 column_wrapper.hpp631 行。

◆ fixed_point_column_wrapper() [4/6]

template<typename Rep >
cudf::test::fixed_point_column_wrapper< Rep >::fixed_point_column_wrapper ( std::initializer_list< Rep >  elements,
std::initializer_list< bool >  validity,
numeric::scale_type  scale 
)
inline

使用另一个列表指示每个元素的有效性,从小数元素的 initializer list 构造一个可空列。

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

示例

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

定义于文件 column_wrapper.hpp669 行。

◆ fixed_point_column_wrapper() [5/6]

template<typename Rep >
template<typename ValidityIterator >
cudf::test::fixed_point_column_wrapper< Rep >::fixed_point_column_wrapper ( std::initializer_list< Rep >  element_list,
ValidityIterator  v,
numeric::scale_type  scale 
)
inline

从小数元素的 initializer list 和范围 [v, v + element_list.size()) 构造一个可空列,该范围被解释为布尔值以指示每个元素的有效性。

示例

// 创建一个包含 4 个元素:{null, 1, null, 3} 的 INT32 可空列
auto validity = make_counting_transform_iterator(0, [](auto i) { return i % 2; });
auto w = fixed_width_column_wrapper<int32_t>{ {1,2,3,4}, validity, scale_type{0}};
模板参数
ValidityIterator解引用 ValidityIterator 必须可转换为 bool
参数
element_list元素的 initializer list
v有效性指示器序列的开头
scale列中元素的比例

定义于文件 column_wrapper.hpp696 行。

◆ fixed_point_column_wrapper() [6/6]

template<typename Rep >
template<typename FixedPointRepIterator >
cudf::test::fixed_point_column_wrapper< Rep >::fixed_point_column_wrapper ( FixedPointRepIterator  begin,
FixedPointRepIterator  end,
std::initializer_list< bool > const &  validity,
numeric::scale_type  scale 
)
inline

构造一个包含范围 [begin,end) 中的小数元素的可空列,使用有效性 initializer list 来指示每个元素的有效性。

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

示例

// 创建一个包含 5 个元素:{null, 1, null, 3, null} 的 DECIMAL32 可空列
fixed_point_column_wrapper<int32_t> w(elements, elements + 5, {0, 1, 0, 1, 0}, scale_type{0});
模板参数
FixedPointRepIteratorfixed_point::rep 的迭代器
参数
begin元素序列的开头
end元素序列的末尾
validity有效性指示器布尔值的 initializer list
scale列中元素的比例

定义于文件 column_wrapper.hpp724 行。


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