Turi Create
4.0
|
#include <core/storage/sframe_data/groupby_aggregate_impl.hpp>
Public Member Functions | |
groupby_element (std::vector< flexible_type > group_key, const std::vector< group_descriptor > &group_desc) | |
groupby_element (const std::string &val, const std::vector< group_descriptor > &group_desc) | |
void | init (std::vector< flexible_type > group_key, const std::vector< group_descriptor > &group_desc) |
void | save (oarchive &oarc) const |
Writes the group result into an output archive. | |
void | load (iarchive &iarc, const std::vector< group_descriptor > &group_desc) |
bool | operator> (const groupby_element &other) const |
bool | operator< (const groupby_element &other) const |
bool | operator== (const groupby_element &other) const |
void | operator+= (const groupby_element &other) |
Public Attributes | |
std::vector< flexible_type > | key |
The key of this aggregation. | |
std::vector< std::unique_ptr< group_aggregate_value > > | values |
All the aggregated values. | |
size_t | hash_val |
A cache of the hash of the key. | |
This class manages all the intermedate aggregation result of a given key. It contains a key, and an array of multiple aggregated values for that key (each aggregated value is for a different aggregator. For instance, one could be sum, one could be count). It then provides
Definition at line 53 of file groupby_aggregate_impl.hpp.
turi::groupby_aggregate_impl::groupby_element::groupby_element | ( | std::vector< flexible_type > | group_key, |
const std::vector< group_descriptor > & | group_desc | ||
) |
Constructs a group element from a key, and a description of all the group operations. All the aggregated values will be initialized as new empty values.
turi::groupby_aggregate_impl::groupby_element::groupby_element | ( | const std::string & | val, |
const std::vector< group_descriptor > & | group_desc | ||
) |
Constructs a groupby_element from a string which contains a serialization of the element. The array of all the descriptors is required.
void turi::groupby_aggregate_impl::groupby_element::init | ( | std::vector< flexible_type > | group_key, |
const std::vector< group_descriptor > & | group_desc | ||
) |
Constructs a group element from a key, and a description of all the group operations. All the aggregated values will be initialized as new empty values.
void turi::groupby_aggregate_impl::groupby_element::load | ( | iarchive & | iarc, |
const std::vector< group_descriptor > & | group_desc | ||
) |
Loads the group result from an input archive and a group operation descriptor
void turi::groupby_aggregate_impl::groupby_element::operator+= | ( | const groupby_element & | other | ) |
Combines values another groupby element which is performing the same set of operations
bool turi::groupby_aggregate_impl::groupby_element::operator< | ( | const groupby_element & | other | ) | const |
Provides a total ordering on group-by elements
bool turi::groupby_aggregate_impl::groupby_element::operator== | ( | const groupby_element & | other | ) | const |
Returns true if this, and other have identical keys
bool turi::groupby_aggregate_impl::groupby_element::operator> | ( | const groupby_element & | other | ) | const |
Provides a total ordering on group-by elements