Turi Create  4.0
turi::groupby_operators::argmax Class Reference

#include <core/storage/sframe_data/groupby_aggregate_operators.hpp>

Public Member Functions

group_aggregate_valuenew_instance () const
 Returns a new empty instance of argmax with the same type.
 
void add_element (const std::vector< flexible_type > &values)
 
void add_element_simple (const flexible_type &flex)
 Adds a new element.
 
void combine (const group_aggregate_value &other)
 combines two partial argmaxes
 
flexible_type emit () const
 Emits the argmax result.
 
bool support_type (flex_type_enum type) const
 The types supported by the argmax.
 
flex_type_enum set_input_types (const std::vector< flex_type_enum > &types)
 The input type to be argmaxed.
 
std::string name () const
 Name of the class.
 
void save (oarchive &oarc) const
 Serializer.
 
void load (iarchive &iarc)
 Deserializer.
 
virtual void partial_finalize ()
 
virtual void print (std::ostream &os) const
 

Detailed Description

Implemenets a argmax aggregator which is used with arg_func

Definition at line 357 of file groupby_aggregate_operators.hpp.

Member Function Documentation

◆ add_element()

void turi::groupby_operators::argmax::add_element ( const std::vector< flexible_type > &  values)
inlinevirtual

Adds an element to the aggregate. Elements to be added will be either the input_type (as set by set_input_type()) or UNDEFINED.

Operator that expects more than one input values need to overwrite this function

Reimplemented from turi::group_aggregate_value.

Definition at line 366 of file groupby_aggregate_operators.hpp.

◆ partial_finalize()

virtual void turi::group_aggregate_value::partial_finalize ( )
inlinevirtualinherited

No more elements will be added to this value. However, this value may still be combined with other values.

Reimplemented in turi::groupby_operators::quantile.

Definition at line 75 of file group_aggregate_value.hpp.

◆ print()

virtual void turi::group_aggregate_value::print ( std::ostream &  os) const
inlinevirtualinherited

Override this function for allowing the operator to be easily printed.

std::cout << aggregator <<s std::endl;

Reimplemented in turi::groupby_operators::variance.

Definition at line 134 of file group_aggregate_value.hpp.


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