简体   繁体   English

C ++ std :: random如何实现其他发行版?

[英]C++ std::random How to implement other distributions?

C++ std statistical distributions has 20 different distributions. C ++ std统计分布有20种不同的分布。 However, I am unable to find some other distributions eg, Burr, Wakeby, Pearson and so on. 但是,我找不到其他发行版,例如Burr,Wakeby,Pearson等。 Could you please suggest me how to implement those distribution easily? 您能否建议我如何轻松实现这些分发?

Regards Sai 问候赛

As with most things in the standard library the random functionality defines Concepts that can be implemented by a user to extend the library. 与标准库中的大多数内容一样,随机功能定义了可由用户实施以扩展库的Concepts The ones for Random Number generation are described in 26.5.1 of N3797 . N3797的 26.5.1中描述了用于随机数生成的那些 Random Number Distributions are described in 26.5.1.6. 随机数分布在26.5.1.6中进行了描述。

To implement a new distribution you need to implement a Functor that fulfills those requirements and then it can be used with the existing library implementations. 要实现新发行版,您需要实现满足这些要求的Functor,然后将其与现有库实现一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM