A truncated zipfian distribution over [0, N - 1], where all items with probability smaller than a threshold in the original zipfian distribution are uniformly sampled with the same probability, while all others are sampled with the same probabilities as in the zipfian.
More...
#include <utils/TruncatedZipfian.h>
|
| | TruncatedZipfian () |
| | Default constructs truncated zipfian in an invalid state. More...
|
| |
| | TruncatedZipfian (uint32_t N, double s, double prob_to_truncate) |
| | Constructs a truncated zipfian(s) distribution over all the integers in [0, N - 1], with all items with probabilities smaller than prob_to_truncate in the zipfian are sampled with the same probabilty, while the remaining are sampled with the probabilities in the zipfian. More...
|
| |
| template<typename RNG > |
| uint32_t | operator() (RNG &rng) |
| |
| constexpr uint32_t | GetMinTruncatedItem () const |
| |
| double | GetProbability (uint32_t x) const |
| |
| constexpr double | GetTotalTruncatedProbability () const |
| |
A truncated zipfian distribution over [0, N - 1], where all items with probability smaller than a threshold in the original zipfian distribution are uniformly sampled with the same probability, while all others are sampled with the same probabilities as in the zipfian.
Note that this class does not satisfy RandomNumberDistribution requirement due to missing many required interfaces.
◆ result_type
◆ TruncatedZipfian() [1/2]
| taco::TruncatedZipfian::TruncatedZipfian |
( |
| ) |
|
|
inline |
Default constructs truncated zipfian in an invalid state.
◆ TruncatedZipfian() [2/2]
| taco::TruncatedZipfian::TruncatedZipfian |
( |
uint32_t |
N, |
|
|
double |
s, |
|
|
double |
prob_to_truncate |
|
) |
| |
Constructs a truncated zipfian(s) distribution over all the integers in [0, N - 1], with all items with probabilities smaller than prob_to_truncate in the zipfian are sampled with the same probabilty, while the remaining are sampled with the probabilities in the zipfian.
◆ GetMinTruncatedItem()
| constexpr uint32_t taco::TruncatedZipfian::GetMinTruncatedItem |
( |
| ) |
const |
|
inlineconstexpr |
◆ GetProbability()
| double taco::TruncatedZipfian::GetProbability |
( |
uint32_t |
x | ) |
const |
◆ GetTotalTruncatedProbability()
| constexpr double taco::TruncatedZipfian::GetTotalTruncatedProbability |
( |
| ) |
const |
|
inlineconstexpr |
◆ operator()()
template<typename RNG >
| uint32_t taco::TruncatedZipfian::operator() |
( |
RNG & |
rng | ) |
|
|
inline |
◆ m_H
| double taco::TruncatedZipfian::m_H |
|
private |
◆ m_min_in_unif
| uint32_t taco::TruncatedZipfian::m_min_in_unif |
|
private |
◆ m_N
| uint32_t taco::TruncatedZipfian::m_N |
|
private |
◆ m_s
| double taco::TruncatedZipfian::m_s |
|
private |
◆ m_total_prob_trunc
| double taco::TruncatedZipfian::m_total_prob_trunc |
|
private |
◆ m_unif_rem
| std::uniform_int_distribution<uint32_t> taco::TruncatedZipfian::m_unif_rem |
|
private |
◆ m_walker
| Walker taco::TruncatedZipfian::m_walker |
|
private |
The documentation for this class was generated from the following files: