tdigest_column_view.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
9 
15 namespace CUDF_EXPORT cudf {
17 namespace tdigest {
50  public:
54  ~tdigest_column_view() override = default;
67 
68  using column_view::size;
69  using offset_iterator = size_type const*;
70 
71  // mean and weight column indices within tdigest inner struct columns
72  static constexpr size_type mean_column_index{0};
73  static constexpr size_type weight_column_index{1};
74 
75  // min and max column indices within tdigest outer struct columns
76  static constexpr size_type centroid_column_index{0};
77  static constexpr size_type min_column_index{1};
78  static constexpr size_type max_column_index{2};
79 
85  [[nodiscard]] column_view parent() const;
86 
92  [[nodiscard]] lists_column_view centroids() const;
93 
99  [[nodiscard]] column_view means() const;
100 
106  [[nodiscard]] column_view weights() const;
107 
114  [[nodiscard]] double const* min_begin() const;
115 
122  [[nodiscard]] double const* max_begin() const;
123 };
124  // end of group
126 } // namespace tdigest
127 } // namespace CUDF_EXPORT cudf
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Given a column-view of lists type, an instance of this class provides a wrapper on this compound colu...
Given a column_view containing tdigest data, an instance of this class provides a wrapper on the comp...
double const * min_begin() const
Returns the first min value for the column. Each row corresponds to the minimum value for the accompa...
size_type const * offset_iterator
Iterator over offsets.
column_view means() const
Returns the internal column of mean values.
tdigest_column_view & operator=(tdigest_column_view &&)=default
Move assignment operator.
tdigest_column_view(tdigest_column_view &&)=default
Move constructor.
tdigest_column_view(tdigest_column_view const &)=default
Copy constructor.
column_view parent() const
Returns the parent column.
tdigest_column_view(column_view const &)
Construct tdigest_column_view from a column_view.
tdigest_column_view & operator=(tdigest_column_view const &)=default
Copy assignment operator.
lists_column_view centroids() const
Returns the column of centroids.
column_view weights() const
Returns the internal column of weight values.
double const * max_begin() const
Returns the first max value for the column. Each row corresponds to the maximum value for the accompa...
column view class definitions
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:76
Class definition for cudf::lists_column_view.
cuDF interfaces
Definition: host_udf.hpp:26