Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize numerical Random discrete Distribution with C++

Shulou Source: shulou.com Published: 2022-06-03 05:43:10 09月30日 Update

This article introduces the relevant knowledge of "how to use C++ to achieve random and discrete numerical distribution". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

# include

# include

# include

# include

# include

Whole Lord ()

{

Random device read

Mt19937 generation (read ())

The γ distribution of / / α = 1, β = 2 is similar to the exponential distribution.

Standard:: gamma distribution d (1BI 2)

Mapping history

Yes (n = 0; n

Tags: Generate p. discrete history output values caterpillars content more knowledge equipment practicality learning next dilemma reality situation index article case Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MariaDB Xiaomi MySQL OPPO Reno