当前位置: 首页 > news >正文

专门做期货的网站网络的推广

专门做期货的网站,网络的推广,wordpress提示数据库出错,wordpress科技模板目录 一&#xff1a;C语言中的随机数 二&#xff1a;C中的随机数 1. 生成随机数的例子 2. 随机数引擎 3. 随机数引擎适配器 4. C中预定义的随机数引擎&#xff0c;引擎适配器 5. 随机数分布 一&#xff1a;C语言中的随机数 <stdlib.h>//初始化随机种子 srand(static_ca…

目录

一:C语言中的随机数

二:C++中的随机数

    1. 生成随机数的例子

    2. 随机数引擎

    3. 随机数引擎适配器

    4. C++中预定义的随机数引擎,引擎适配器

    5. 随机数分布


一:C语言中的随机数

<stdlib.h>//初始化随机种子
srand(static_cast<unsigned int>(time(nullptr)));//生成随机数
cout << rand() << endl;//生成一个区间的内随机数(min, max)
return static_cast<int>(rand() % (max + 1UL - min)) + min;//生成100内随机数
int num = rand() % 100;//生成1-100内随机数
int num = rand() % 100 + 1;

二:C++中的随机数

    1. 生成随机数的例子
include <random>
#include <map>
#include <iostream>int main()
{static const int NUM = 1000000;//第一步 产生随机种子std::random_device seed;//第二步:使用随机数引擎生成器std::mt19937 gen(seed());//第三步:为随机数选择一种分布,此处选择均匀分布std::uniform_int_distribution<> uniformDist(0, 20); // min= 0; max= 20for (int i = 1; i <= NUM; ++i) {std::cout << uniformDist(gen) << " ";}
}
    2. 随机数引擎
引擎说明
random_device真随机数(非基于软件生成器),通常用来产生随机种子
linear_congruential_engine线性同余法生成器
mersenne_twister_engine梅森素数法生成器
subtract_with_carry_engine带进位减法随机数生成器
    3. 随机数引擎适配器
template<class Engine, size_t p, size_t r> class discard_block_engine {...}
template<class Engine, size_t w, class UIntT> class independent_bits_engine {...}
template<class Engine, size_t k> class shuffle_order_engine {...}
    4. C++中预定义的随机数引擎,引擎适配器

  5. 随机数分布
template<class IntType = int> class uniform_int_distribution
uniform_int_distribution(IntType a = 0, IntType b = numeric_limits<IntType>::max());template<class RealType = double> class uniform_real_distribution
uniform_real_distribution(RealType a = 0.0, RealType b = 1.0);class bernoulli_distribution
bernoulli_distribution(double p = 0.5);template<class IntType = int> class binomial_distribution
binomial_distribution(IntType t = 1, double p = 0.5);template<class IntType = int> class geometric_distribution
geometric_distribution(double p = 0.5);template<class IntType = int> class negative_binomial_distribution
negative_binomial_distribution(IntType k = 1, double p = 0.5)template<class IntType = int> class poisson_distribution
poisson_distribution(double mean = 1.0);template<class RealType = double> class exponential_distribution
exponential_distribution(RealType lambda = 1.0);template<class RealType = double> class gamma_distribution
gamma_distribution(RealType alpha = 1.0, RealType beta = 1.0);template<class RealType = double> class weibull_distribution
weibull_distribution(RealType a = 1.0, RealType b = 1.0);template<class RealType = double> class extreme_value_distribution
extreme_value_distribution(RealType a = 0.0, RealType b = 1.0);template<class RealType = double> class normal_distribution
normal_distribution(RealType mean = 0.0, RealType stddev = 1.0);template<class RealType = double> class lognormal_distribution
lognormal_distribution(RealType m = 0.0, RealType s = 1.0);template<class RealType = double> class chi_squared_distribution
chi_squared_distribution(RealType n = 1);template<class RealType = double> class cauchy_distribution
cauchy_distribution(RealType a = 0.0, RealType b = 1.0);template<class RealType = double> class fisher_f_distribution
fisher_f_distribution(RealType m = 1, RealType n = 1);template<class RealType = double> class student_t_distribution
student_t_distribution(RealType n = 1);template<class IntType = int> class discrete_distribution
discrete_distribution(initializer_list<double> wl);template<class RealType = double> class piecewise_constant_distribution
template<class UnaryOperation>piecewise_constant_distribution(initializer_list<RealType> bl,
UnaryOperation fw);template<class RealType = double> class piecewise_linear_distribution
template<class UnaryOperation>piecewise_linear_distribution(initializer_list<RealType> bl,
UnaryOperation fw);

http://www.tj-hxxt.cn/news/33440.html

相关文章:

  • 做家装的设计公司网站网络营销学院
  • 建设项目立项网站东莞疫情最新消息今天
  • dw做音乐网站2022真实新闻作文400字
  • 网站域名所有权 查询怎样在百度做广告宣传
  • 龙岗万达广场seo专员岗位职责
  • 做特卖的网站东莞疫情最新消息通知
  • 网站主页设计注意点app注册推广任务平台
  • 自助免费网站制作网络营销理论包括哪些
  • webview做网站app开发客户的70个渠道
  • 开发一个网页具体流程百度seo如何快速排名
  • 网站网站建设公司广州seo网络培训课程
  • 网站网页设计有哪些北京优化seo排名优化
  • 重庆做营销网站手机优化什么意思
  • 日本平面设计大师个人网站广东今天新闻最新消息
  • 有没有专门做线下活动的网站付费恶意点击软件
  • 成都哪里有做网站的网站运营seo实训总结
  • 怀柔成都网站建设南宁seo产品优化服务
  • 阿里巴巴网站详情页怎么做的外贸推广如何做
  • 苏州抖音代运营公司seo短视频发布页
  • 西安专业网站建设公司排名深圳经济最新新闻
  • 查看网站用什么语言做的seo应该如何做
  • 企业手机端网站源码江阴百度推广公司
  • 东莞最新新闻头条新闻网站seo优化服务
  • 公司电子产品网站模板石家庄网站建设排名
  • 上海网站优化上网页广告调词平台
  • 成都网站建设怎么样有效果的网站排名
  • 绵阳网络公司网站建设seo网站推广助理招聘
  • 学院网站信息化建设总结广州推动优化防控措施落地
  • 网站制作好以后怎么管理软文推广一般发布在哪些平台
  • 织梦网站模板操作网站关键词怎么优化到首页