Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 ( const common::Range range)
inlineexplicit

Definition at line 103 of file reduce_functional.hpp.

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

Definition at line 106 of file reduce_functional.hpp.

Member Function Documentation

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.

References Range::begin, ReduceByIndex< Key >::range_, and Range::size().

Referenced by ReduceByIndex< Key >::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.

References ReduceByIndex< Key >::inverse().

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.

References Range::begin, ReduceByIndex< Key >::range_, and Range::size().

const common::Range& range ( ) const
inline

Definition at line 109 of file reduce_functional.hpp.

References ReduceByIndex< Key >::range_.

Referenced by ReduceByIndex< Key >::set_range().

void set_range ( const common::Range range)
inline

Member Data Documentation


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