登录
首页 » 算法 » 程序只产生均值为0,方差为1的随机数,要产生均值为E,方差为D的随机数,只要随机数*D+E就可以了。高斯随机数程序还是带参数的,参数是用来描述正态分布的一个浮点...

程序只产生均值为0,方差为1的随机数,要产生均值为E,方差为D的随机数,只要随机数*D+E就可以了。高斯随机数程序还是带参数的,参数是用来描述正态分布的一个浮点...

于 2023-08-17 发布 文件大小:1.86 kB
0 92
下载积分: 2 下载次数: 1

代码说明:

程序只产生均值为0,方差为1的随机数,要产生均值为E,方差为D的随机数,只要随机数*D+E就可以了。高斯随机数程序还是带参数的,参数是用来描述正态分布的一个浮点数表。在执行程序时,先生成这个表(只做一次),而后就可以任意多次地执行高斯随机数产生程序了。使用C是为了保证通用性,如果有人觉得麻烦,可以用C++做个类,把这些东西都封装进去。另外,如果有人有兴趣,也可以把它修改成任意形式分布的连续随机数产生程序,修改非常简单,这里就不提示了。-procedures have only mean of 0 and variance for a random number to produce the mean E, D variance for the random number, as long as a few random E* D on it. Gaussian random process parameters or with the parameter is used to describe a normal distribution of the float table. In the implementation process, Mr. into the table (one-off), and you can repeatedly arbitrary implementation Gaussian random number generator proceedings. The use of C is to ensure commonality, if someone finds trouble, can be used to be a Class C, all these things into account Packaging. Also, if someone is interested, can you change the form of arbitrary distribution of continuous random number generator procedure is very simple changes, I will not be sacrificed as a result.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Genetic Algorithm, is an evolutionary algorithm, the basic principle is to emulate the biosphere in
    遗传算法是一种进化算法,其基本原理是模仿生物圈中“物竞天择、适者生存”的进化规律。该方法将遗传算法的参数编码为染色体,再利用迭代的方式,如选择、交叉和变异等算子来交换染色体种群的信息,得到优化目标在染色体上的行;
    2023-08-30 21:25:03下载
    积分:1
  • 采用vs2008 c#编写 Q
    采用vs2008 c#编写 Q-Learning强化学习的代码实现 状态空间5维,动作空间5维-Using vs2008 c# Q-Learning reinforcement learning the code to achieve the state-space five-dimensional, five-dimensional action space
    2022-01-22 07:59:13下载
    积分:1
  • BP神经网络的非线性系统建模--非线性函数的拟合
    通过一个简单是二元二次函数,实现bps神经网络的非线性拟合,逼近真实值。非常适合初学者。
    2022-02-09 16:21:35下载
    积分:1
  • 维特比的通俗理解
    资源描述维特比算法的通俗理解就是动态规划的最短路径,在这里不再赘述,如果真的想仔细研究的话请参见《数学之美》
    2023-02-04 23:20:03下载
    积分:1
  • 使用指南: 只要打开PHP文件,将$file的初值改为PHP文件实际的URL。 (其实有函数可以自动实现这一功能,但在有些服务器上 会出问题,保险起见,还是自己...
    使用指南: 只要打开PHP文件,将$file的初值改为PHP文件实际的URL。 (其实有函数可以自动实现这一功能,但在有些服务器上 会出问题,保险起见,还是自己输入来得放心)。 上传到服务期的目录下即可使用――如果服务器支持PHP的话。 若不带参数或错误参数,则显示当月月历。-use of the guidelines : Open the PHP file to the initial $ file into a PHP file the actual URL. (Actually function can automatically provide this functionality, but in some servers will be problems, insurance purposes, or our own import more assured). Uploaded to the service directory can be used-- if the server supports PHP in the past. If parameters or with the wrong parameters, it shows that the calendar month.
    2022-01-20 22:47:32下载
    积分:1
  • 野人和传教士的
    这是一个算法来解决问题的野蛮人和传道人,这是用Cpp 语言写的。
    2022-03-11 00:57:02下载
    积分:1
  • 大数C++程序,实现加减乘除等
          超强大数代码,实现产生大数,大数之间的运算,超级强大~~~为各种加解密算法提供帮助!
    2022-10-16 09:00:03下载
    积分:1
  • 数组为8位char型数值,通过该函数可以计出数组的16位循环校验码。...
    数组为8位char型数值,通过该函数可以计算出数组的16位循环校验码。-Array for the 8-bit char type values can be calculated through the function of an array of 16 cycle parity-check codes.
    2023-06-20 15:25:03下载
    积分:1
  • ffmpg库的源码
    FFmpeg README ------------- 1) Documentation ---------------- * Read the documentation in the doc/ directory. 2) Licensing ------------ * Read the file COPYING. ffmpeg and the associated libraries EXCEPT   liba52 and libpostproc are licensed under the Lesser GNU General   Public License. * liba52 and libpostproc are distributed under the GNU General Public   License and their compilation and use is optional in ffmpeg. Fabrice Bellard.
    2022-07-03 09:19:29下载
    积分:1
  • SPWM在DSP2812上实现
    *说  明:EVA下面的通用定时器T1工作于连续增/减计数模式,产生三角载波,载波频率为 *        3000Hz,载波比N=60,因此调制波形正弦波的频率为50Hz。本实验中,调制度为 *        0.8。
    2022-11-17 03:10:04下载
    积分:1
  • 696518资源总数
  • 105877会员总数
  • 14今日下载