Thrill
0.1
|
#include <math.hpp>
Public Member Functions | |
Range ()=default | |
Range (size_t begin, size_t end) | |
size_t | CalculateBeginOfPart (size_t i, size_t parts) const |
bool | Contains (size_t x) const |
true if the Range contains x More... | |
size_t | FindPartition (size_t index, size_t parts) const |
bool | IsEmpty () const |
range is empty (begin == end) More... | |
bool | IsValid () const |
valid non-empty range (begin < end) More... | |
Range | operator+ (const size_t &shift) const |
return shifted Range More... | |
Range | Partition (size_t i, size_t parts) const |
size_t | size () const |
size of range More... | |
void | Swap () |
swap boundaries, making a valid range invalid. More... | |
Static Public Member Functions | |
static Range | Invalid () |
Public Attributes | |
Attributes | |
size_t | begin = 0 |
begin index More... | |
size_t | end = 0 |
end index More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Range &r) |
ostream-able More... | |
|
default |
Referenced by thrill::common::CalculateLocalRange(), Range::Invalid(), Range::operator+(), and Range::Partition().
|
inline |
Definition at line 91 of file math.hpp.
References Range::begin, and Range::size().
Referenced by Range::Partition().
|
inline |
|
inline |
calculate the partition (ranging from 0 to parts - 1) into which index falls
Definition at line 98 of file math.hpp.
References Range::size().
|
inlinestatic |
Definition at line 47 of file math.hpp.
References max(), min(), and Range::Range().
|
inline |
|
inline |
|
inline |
|
inline |
calculate a partition range [begin,end) by taking the current Range splitting it into p parts and taking the i-th one.
Definition at line 85 of file math.hpp.
References Range::CalculateBeginOfPart(), and Range::Range().
|
inline |
size of range
Definition at line 63 of file math.hpp.
References Range::begin.
Referenced by Range::CalculateBeginOfPart(), Range::FindPartition(), and ReduceByIndexPostPhase< TableItem, Key, ValueType, KeyExtractor, ReduceFunction, thrill::api::ReduceToIndexNode::Emitter, VolatileKey, ReduceConfig >::Initialize().
|
inline |
swap boundaries, making a valid range invalid.
Definition at line 71 of file math.hpp.
References tlx::swap().
|
friend |
size_t begin = 0 |
begin index
Definition at line 56 of file math.hpp.
Referenced by Range::CalculateBeginOfPart(), thrill::common::CalculatePartition(), DistributeNode< ValueType >::Execute(), ReadLinesNode::InputLineIteratorCompressed::InputLineIteratorCompressed(), ReadLinesNode::InputLineIteratorUncompressed::InputLineIteratorUncompressed(), ReduceByIndexPostPhase< TableItem, Key, ValueType, KeyExtractor, ReduceFunction, thrill::api::ReduceToIndexNode::Emitter, VolatileKey, ReduceConfig >::Insert(), thrill::vfs::OpenReadStream(), EqualToDIANode< ValueType >::PushData(), GenerateNode< ValueType, GenerateFunction >::PushData(), GroupToIndexNode< ValueType, KeyExtractor, GroupFunction >::PushData(), ReadBinaryNode< ValueType >::ReadBinaryNode(), GroupToIndexNode< ValueType, KeyExtractor, GroupFunction >::RunUserFunc(), Range::size(), and thrill::vfs::SysOpenReadStream().
size_t end = 0 |
end index
Definition at line 58 of file math.hpp.
Referenced by thrill::common::CalculatePartition(), Range::Contains(), DistributeNode< ValueType >::Execute(), ReadLinesNode::InputLineIteratorUncompressed::HasNext(), ReadLinesNode::InputLineIteratorCompressed::HasNext(), ReadLinesNode::InputLineIteratorCompressed::InputLineIteratorCompressed(), ReadLinesNode::InputLineIteratorUncompressed::InputLineIteratorUncompressed(), ReduceByIndexPostPhase< TableItem, Key, ValueType, KeyExtractor, ReduceFunction, thrill::api::ReduceToIndexNode::Emitter, VolatileKey, ReduceConfig >::Insert(), Range::IsEmpty(), Range::IsValid(), EqualToDIANode< ValueType >::PushData(), GenerateNode< ValueType, GenerateFunction >::PushData(), GroupToIndexNode< ValueType, KeyExtractor, GroupFunction >::PushData(), ReadBinaryNode< ValueType >::ReadBinaryNode(), GroupToIndexNode< ValueType, KeyExtractor, GroupFunction >::RunUserFunc(), DuplicateDetection::WriteEncodedHashes(), and LocationDetection< thrill::api::JoinNode::HashCount >::WriteOccurenceCounts().