Turi Create
4.0
|
#include <core/storage/sframe_data/groupby.hpp>
Public Member Functions | |
hash_bucket (size_t buffer_size, std::shared_ptr< sink_type > sink, size_t segmentid, comparator_type comparator, bool deduplicate=false) | |
construct with given sarray and the segmentid as sink. | |
void | add (const value_type &val) |
Add a new element to the container. | |
void | flush () |
Flush the last buffer. | |
template<typename OutIterator > | |
void | sort_and_write (OutIterator out) |
Storing elements that gets hashed to the bucket in sorted order.
The container has an in memory buffer, and is backed by an sarray segment. When the buffer is full, it is sorted and written into the sarray segment as a sorted chunk.
The sort_and_write function then merges the sorted chunks and output to the destination array.
Definition at line 33 of file groupby.hpp.
void turi::hash_bucket< T >::sort_and_write | ( | OutIterator | out | ) |
Sort all elements in the container and writes to the output. If deduplicate is true, only output unique elements.