19 #ifndef THRILL_EXAMPLES_PAGE_RANK_ZIPF_GRAPH_GEN_HEADER 20 #define THRILL_EXAMPLES_PAGE_RANK_ZIPF_GRAPH_GEN_HEADER 55 size_mean(base.size_mean), size_var(base.size_var),
56 link_zipf_scale(base.link_zipf_scale),
57 link_zipf_exponent(base.link_zipf_exponent)
68 pages, link_zipf_scale, link_zipf_exponent);
76 template <
typename Generator>
79 if (dsize < 0) dsize = 0;
81 size_t size =
static_cast<size_t>(std::round(dsize));
83 std::vector<size_t> result;
86 for (
size_t i = 0; i < size; ++i) {
89 std::sort(result.begin(), result.end());
104 #endif // !THRILL_EXAMPLES_PAGE_RANK_ZIPF_GRAPH_GEN_HEADER std::vector< size_t > GenerateOutgoing(Generator &rng)
thrill::common::ZipfDistribution ZipfDistribution
ZipfGraphGen(uint64_t _pages)
A class for producing random integers distributed according to the Zipf-Mandelbrot probability mass f...
double size_mean
Gaussian mean and variance of content length.
void Initialize(uint64_t _pages)
reinitialize the random generator if parameters were changed.
std::normal_distribution< double > content_length_dist_
Gaussian random variable for content length of a page.
double link_zipf_exponent
uint64_t pages
number of pages in graph
ZipfGraphGen(const ZipfGraphGen &base, uint64_t _pages)
void Initialize()
reinitialize the random generator if parameters were changed.
ZipfDistribution link_zipf_
Zipf random variable for outgoing links.