Thrill  0.1
ReduceByIndex< Key > Class Template Reference

Detailed Description

template<typename Key>
class thrill::core::ReduceByIndex< Key >

A reduce index function, which determines a bucket depending on the current index range [begin,end).

It is used by ReduceToIndex.

Definition at line 84 of file reduce_functional.hpp.

+ Collaboration diagram for ReduceByIndex< Key >:

#include <reduce_functional.hpp>

Classes

struct  Result
 

Public Member Functions

 ReduceByIndex (const common::Range &range)
 
 ReduceByIndex (size_t begin=0, size_t end=0)
 
size_t inverse (size_t bucket, const size_t &num_buckets)
 
common::Range inverse_range (size_t partition_id, const size_t &num_buckets_per_partition, const size_t &num_buckets)
 deliver inverse range mapping of a partition More...
 
Result operator() (const Key &k, const size_t &, const size_t &num_buckets_per_partition, const size_t &num_buckets) const
 
const common::Rangerange () const
 
void set_range (const common::Range &range)
 

Private Attributes

common::Range range_
 

Constructor & Destructor Documentation

◆ ReduceByIndex() [1/2]

ReduceByIndex ( const common::Range range)
inlineexplicit

Definition at line 103 of file reduce_functional.hpp.

◆ ReduceByIndex() [2/2]

ReduceByIndex ( size_t  begin = 0,
size_t  end = 0 
)
inlineexplicit

Definition at line 106 of file reduce_functional.hpp.

Member Function Documentation

◆ inverse()

size_t inverse ( size_t  bucket,
const size_t &  num_buckets 
)
inline

inverse mapping: takes a bucket index and returns the smallest index delivered to the bucket.

Definition at line 132 of file reduce_functional.hpp.

◆ inverse_range()

common::Range inverse_range ( size_t  partition_id,
const size_t &  num_buckets_per_partition,
const size_t &  num_buckets 
)
inline

deliver inverse range mapping of a partition

Definition at line 139 of file reduce_functional.hpp.

◆ operator()()

Result operator() ( const Key &  k,
const size_t &  ,
const size_t &  num_buckets_per_partition,
const size_t &  num_buckets 
) const
inline

Definition at line 113 of file reduce_functional.hpp.

◆ range()

const common::Range& range ( ) const
inline

Definition at line 109 of file reduce_functional.hpp.

◆ set_range()

void set_range ( const common::Range range)
inline

Definition at line 111 of file reduce_functional.hpp.

Member Data Documentation

◆ range_

common::Range range_
private

Definition at line 148 of file reduce_functional.hpp.


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