tdigest_column_view.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
20 
21 namespace CUDF_EXPORT cudf {
23 namespace tdigest {
58  public:
62  ~tdigest_column_view() override = default;
75 
76  using column_view::size;
77  using offset_iterator = size_type const*;
78 
79  // mean and weight column indices within tdigest inner struct columns
80  static constexpr size_type mean_column_index{0};
81  static constexpr size_type weight_column_index{1};
82 
83  // min and max column indices within tdigest outer struct columns
84  static constexpr size_type centroid_column_index{0};
85  static constexpr size_type min_column_index{1};
86  static constexpr size_type max_column_index{2};
87 
93  [[nodiscard]] column_view parent() const;
94 
100  [[nodiscard]] lists_column_view centroids() const;
101 
107  [[nodiscard]] column_view means() const;
108 
114  [[nodiscard]] column_view weights() const;
115 
122  [[nodiscard]] double const* min_begin() const;
123 
130  [[nodiscard]] double const* max_begin() const;
131 };
132  // end of group
134 } // namespace tdigest
135 } // 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:95
Class definition for cudf::lists_column_view.
cuDF interfaces
Definition: aggregation.hpp:35