abseil / abseil/abseil-cpp

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

Đang mở
#1,818 2 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
18.1k
Fork
3.2k
Merge trung bình
20 giờ 36 phút
Pull request đã merge (30 ngày)
1

Mô tả

### 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.