Thrill  0.1
BernoulliSampleNode< ValueType > Class Template Reference

Detailed Description

template<typename ValueType>
class thrill::api::BernoulliSampleNode< ValueType >

Definition at line 27 of file bernoulli_sample.hpp.

#include <bernoulli_sample.hpp>

Public Member Functions

 BernoulliSampleNode (double p)
 
template<typename Emitter >
void operator() (const ValueType &item, Emitter &&emit)
 
bool use_skip () const
 

Private Types

using SkipDistValueType = int
 

Private Attributes

const double p_
 
std::default_random_engine rng_ { std::random_device { } () }
 
std::bernoulli_distribution simple_dist_
 
std::geometric_distribution< SkipDistValueTypeskip_dist_
 
SkipDistValueType skip_remaining_ = -1
 
const bool use_skip_
 

Static Private Attributes

static const bool debug = false
 

Member Typedef Documentation

◆ SkipDistValueType

using SkipDistValueType = int
private

Definition at line 31 of file bernoulli_sample.hpp.

Constructor & Destructor Documentation

◆ BernoulliSampleNode()

Member Function Documentation

◆ operator()()

◆ use_skip()

bool use_skip ( ) const
inline

Definition at line 72 of file bernoulli_sample.hpp.

References BernoulliSampleNode< ValueType >::use_skip_.

Member Data Documentation

◆ debug

const bool debug = false
staticprivate

Definition at line 29 of file bernoulli_sample.hpp.

◆ p_

const double p_
private

Definition at line 78 of file bernoulli_sample.hpp.

◆ rng_

std::default_random_engine rng_ { std::random_device { } () }
private

◆ simple_dist_

std::bernoulli_distribution simple_dist_
private

◆ skip_dist_

std::geometric_distribution<SkipDistValueType> skip_dist_
private

◆ skip_remaining_

◆ use_skip_


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