Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
sigma的构造函数的参数是否std::normal_distribution平方?
sigma
std::normal_distribution
sigma参数是标准偏差而不是方差。例如,下面的代码输出4(而不是2)。
4
2
#include <iostream> #include <random> int main() { std::normal_distribution<double> d(0.0, 4.0); std::cout << d.stddev() << std::endl; }