首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::negative_binomial_distribution::negative_binomial_distribution

explicit negative_binomial_distribution( IntType k = 1, double p = 0.5 );

(1)

(since C++11)

explicit negative_binomial_distribution( const param_type& params );

(2)

(since C++11)

构造一个新的分发对象。第一个版本使用kp作为分发参数,第二个版本使用params作为分布参数。

参数

k

-

the k distribution parameter (number of trial failures)

p

-

the p distribution parameter (probability of a trial generating true)

params

-

the distribution parameter set

注记

要求0<p≤1和0<k。

如果p == 1,对operator()不接受param_type对象将导致未定义的行为。

默认构造std::negative_binomial_distribution等于默认构造的std::geometric_distribution...

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com