Public Types | Public Member Functions | Public Attributes | List of all members
cudf::aggregation Class Referenceabstract

Abstract base class for specifying the desired aggregation in an aggregation_request. More...

#include <aggregation.hpp>

Inheritance diagram for cudf::aggregation:
cudf::groupby_aggregation cudf::groupby_scan_aggregation cudf::reduce_aggregation cudf::rolling_aggregation cudf::scan_aggregation cudf::segmented_reduce_aggregation

Public Types

enum  Kind {
  SUM , PRODUCT , MIN , MAX ,
  COUNT_VALID , COUNT_ALL , ANY , ALL ,
  SUM_OF_SQUARES , MEAN , M2 , VARIANCE ,
  STD , MEDIAN , QUANTILE , ARGMAX ,
  ARGMIN , NUNIQUE , NTH_ELEMENT , ROW_NUMBER ,
  EWMA , RANK , COLLECT_LIST , COLLECT_SET ,
  LEAD , LAG , PTX , CUDA ,
  MERGE_LISTS , MERGE_SETS , MERGE_M2 , COVARIANCE ,
  CORRELATION , TDIGEST , MERGE_TDIGEST , HISTOGRAM ,
  MERGE_HISTOGRAM
}
 Possible aggregation operations. More...
 

Public Member Functions

 aggregation (aggregation::Kind a)
 Construct a new aggregation object. More...
 
virtual bool is_equal (aggregation const &other) const
 Compares two aggregation objects for equality. More...
 
virtual size_t do_hash () const
 Computes the hash value of the aggregation. More...
 
virtual std::unique_ptr< aggregationclone () const =0
 Clones the aggregation object. More...
 
virtual std::vector< std::unique_ptr< aggregation > > get_simple_aggregations (data_type col_type, cudf::detail::simple_aggregations_collector &collector) const =0
 Get the simple aggregations that this aggregation requires to compute. More...
 
virtual void finalize (cudf::detail::aggregation_finalizer &finalizer) const =0
 Compute the aggregation after pre-requisite simple aggregations have been computed. More...
 

Public Attributes

Kind kind
 The aggregation to perform.
 

Detailed Description

Abstract base class for specifying the desired aggregation in an aggregation_request.

All aggregations must derive from this class to implement the pure virtual functions and potentially encapsulate additional information needed to compute the aggregation.

Definition at line 81 of file aggregation.hpp.

Member Enumeration Documentation

◆ Kind

Possible aggregation operations.

Enumerator
SUM 

sum reduction

PRODUCT 

product reduction

MIN 

min reduction

MAX 

max reduction

COUNT_VALID 

count number of valid elements

COUNT_ALL 

count number of elements

ANY 

any reduction

ALL 

all reduction

SUM_OF_SQUARES 

sum of squares reduction

MEAN 

arithmetic mean reduction

M2 

sum of squares of differences from the mean

VARIANCE 

variance

STD 

standard deviation

MEDIAN 

median reduction

QUANTILE 

compute specified quantile(s)

ARGMAX 

Index of max element.

ARGMIN 

Index of min element.

NUNIQUE 

count number of unique elements

NTH_ELEMENT 

get the nth element

ROW_NUMBER 

get row-number of current index (relative to rolling window)

EWMA 

get exponential weighted moving average at current index

RANK 

get rank of current index

COLLECT_LIST 

collect values into a list

COLLECT_SET 

collect values into a list without duplicate entries

LEAD 

window function, accesses row at specified offset following current row

LAG 

window function, accesses row at specified offset preceding current row

PTX 

PTX UDF based reduction.

CUDA 

CUDA UDF based reduction.

MERGE_LISTS 

merge multiple lists values into one list

MERGE_SETS 

merge multiple lists values into one list then drop duplicate entries

MERGE_M2 

merge partial values of M2 aggregation,

COVARIANCE 

covariance between two sets of elements

CORRELATION 

correlation between two sets of elements

TDIGEST 

create a tdigest from a set of input values

MERGE_TDIGEST 

create a tdigest by merging multiple tdigests together

HISTOGRAM 

compute frequency of each element

MERGE_HISTOGRAM 

merge partial values of HISTOGRAM aggregation,

Definition at line 86 of file aggregation.hpp.

Constructor & Destructor Documentation

◆ aggregation()

cudf::aggregation::aggregation ( aggregation::Kind  a)
inline

Construct a new aggregation object.

Parameters
aaggregation::Kind enum value

Definition at line 133 of file aggregation.hpp.

Member Function Documentation

◆ clone()

virtual std::unique_ptr<aggregation> cudf::aggregation::clone ( ) const
pure virtual

Clones the aggregation object.

Returns
A copy of the aggregation object

◆ do_hash()

virtual size_t cudf::aggregation::do_hash ( ) const
inlinevirtual

Computes the hash value of the aggregation.

Returns
The hash value of the aggregation

Definition at line 150 of file aggregation.hpp.

◆ finalize()

virtual void cudf::aggregation::finalize ( cudf::detail::aggregation_finalizer &  finalizer) const
pure virtual

Compute the aggregation after pre-requisite simple aggregations have been computed.

Parameters
finalizerThe finalizer visitor pattern to use to compute the aggregation

◆ get_simple_aggregations()

virtual std::vector<std::unique_ptr<aggregation> > cudf::aggregation::get_simple_aggregations ( data_type  col_type,
cudf::detail::simple_aggregations_collector &  collector 
) const
pure virtual

Get the simple aggregations that this aggregation requires to compute.

Parameters
col_typeThe type of the column to aggregate
collectorThe collector visitor pattern to use to collect the simple aggregations
Returns
Vector of pre-requisite simple aggregations

◆ is_equal()

virtual bool cudf::aggregation::is_equal ( aggregation const &  other) const
inlinevirtual

Compares two aggregation objects for equality.

Parameters
otherThe other aggregation to compare with
Returns
True if the two aggregations are equal

Definition at line 143 of file aggregation.hpp.


The documentation for this class was generated from the following file: