abseil / abseil/abseil-cpp

[Bug]: zipf_distribution support is incomplete (q < 1 is unsupported right now)

未关闭
#1,818 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
18.1k
派生
3.2k
平均合并
20 小时 36 分钟
30 天内合并 PR
1

描述

### Describe the issue

See comment at https://github.com/abseil/abseil-cpp/blob/master/absl/random/zipf_distribution.h#L38 regarding q > 1 precondition. We have use cases that require zipf q < 1.

This is mathematically well defined since the distribution is discrete over an alphabet [0, k]. q > 1 restriction only mathematically applies if one is sampling over the infinite range distribution [0, 1, ...].

### Steps to reproduce the problem

N/A, code at HEAD (0f102ad)

### What version of Abseil are you using?

0f102ad

### What operating system and version are you using?

Linux

### What compiler and version are you using?

N/A

### What build system are you using?

N/A

### Additional context

We require q < 1 for certain internal modeling at Meta.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。