将gsl_ran_超几何_pdf(k,n1,n2,t)转换为boost::math::超几何_分布 如何翻译这个使用超几何的C++程序? 分布函数

将gsl_ran_超几何_pdf(k,n1,n2,t)转换为boost::math::超几何_分布 如何翻译这个使用超几何的C++程序? 分布函数,c++,boost,statistics,gsl,C++,Boost,Statistics,Gsl,到C++程序,而不是使用从中的类似函数 #包括 #包括 #包括 #包括 int main(int argc,char*argv[]){ 无符号整数n1=256; 无符号整数n2=1583; 无符号整数t=300; 无符号整数k=40; std::cout下面是对Boost函数的翻译: #include <cstdlib> #include <iostream> #include <boost/math/distributions/hypergeometric.hpp

到C++程序,而不是使用从

中的类似函数
#包括
#包括
#包括
#包括
int main(int argc,char*argv[]){
无符号整数n1=256;
无符号整数n2=1583;
无符号整数t=300;
无符号整数k=40;

std::cout下面是对Boost函数的翻译:

#include <cstdlib>
#include <iostream>
#include <boost/math/distributions/hypergeometric.hpp>
#include <boost/math/policies/policy.hpp>

int main(int argc, char *argv[]) {
  unsigned int n1 = 256;
  unsigned int n2 = 1583;
  unsigned int t = 300;
  unsigned int k = 40;
  boost::math::hypergeometric_distribution<double> hg_dist(n1, t, n1 + n2);
  std::cout << boost::math::pdf<double>(hg_dist, k)
            << std::endl
            << boost::math::cdf<double>(hg_dist, k)
            << std::endl;
  return EXIT_SUCCESS;
}
#包括
#包括
#包括
#包括
int main(int argc,char*argv[]){
无符号整数n1=256;
无符号整数n2=1583;
无符号整数t=300;
无符号整数k=40;
数学:超几何分布(n1,t,n1+n2);

std::cout下面是对Boost函数的翻译:

#include <cstdlib>
#include <iostream>
#include <boost/math/distributions/hypergeometric.hpp>
#include <boost/math/policies/policy.hpp>

int main(int argc, char *argv[]) {
  unsigned int n1 = 256;
  unsigned int n2 = 1583;
  unsigned int t = 300;
  unsigned int k = 40;
  boost::math::hypergeometric_distribution<double> hg_dist(n1, t, n1 + n2);
  std::cout << boost::math::pdf<double>(hg_dist, k)
            << std::endl
            << boost::math::cdf<double>(hg_dist, k)
            << std::endl;
  return EXIT_SUCCESS;
}
#包括
#包括
#包括
#包括
int main(int argc,char*argv[]){
无符号整数n1=256;
无符号整数n2=1583;
无符号整数t=300;
无符号整数k=40;
数学:超几何分布(n1,t,n1+n2);
标准::cout