Thrill  0.1
ReduceByHash< Key, HashFunction > Class Template Reference

Detailed Description

template<typename Key, typename HashFunction = std::hash<Key>>
class thrill::core::ReduceByHash< Key, HashFunction >

A reduce index function which returns a hash index and partition.

It is used by ReduceByKey.

Definition at line 31 of file reduce_functional.hpp.

#include <reduce_functional.hpp>

Classes

struct  Result
 

Public Member Functions

 ReduceByHash (const HashFunction &hash_function=HashFunction())
 
 ReduceByHash (const uint64_t &salt, const HashFunction &hash_function=HashFunction())
 
 ReduceByHash (const uint64_t &salt, const ReduceByHash &other)
 
Result operator() (const Key &k, const size_t &num_partitions, const size_t &, const size_t &) const
 

Private Attributes

HashFunction hash_function_
 
uint64_t salt_
 

Constructor & Destructor Documentation

◆ ReduceByHash() [1/3]

ReduceByHash ( const HashFunction &  hash_function = HashFunction())
inlineexplicit

Definition at line 47 of file reduce_functional.hpp.

◆ ReduceByHash() [2/3]

ReduceByHash ( const uint64_t &  salt,
const HashFunction &  hash_function = HashFunction() 
)
inlineexplicit

Definition at line 51 of file reduce_functional.hpp.

◆ ReduceByHash() [3/3]

ReduceByHash ( const uint64_t &  salt,
const ReduceByHash< Key, HashFunction > &  other 
)
inline

Definition at line 56 of file reduce_functional.hpp.

Member Function Documentation

◆ operator()()

Result operator() ( const Key &  k,
const size_t &  num_partitions,
const size_t &  ,
const size_t &   
) const
inline

Member Data Documentation

◆ hash_function_

HashFunction hash_function_
private

Definition at line 76 of file reduce_functional.hpp.

Referenced by ReduceByHash< Key, HashFunction >::operator()().

◆ salt_

uint64_t salt_
private

Definition at line 75 of file reduce_functional.hpp.

Referenced by ReduceByHash< Key, HashFunction >::operator()().


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