⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 distribu.h

📁 eC++编译器源码
💻 H
字号:
#pragma Distributions
#include <Random.h> 

/* All of the voids below require the use of a variable of type
   RandomStream.  This type is defined in Random.h and should be initialized
   by a call to Random.InitSeed.  The Random module uses this type to produce
   random numbers. See Random.h for details.*/

  double Exponential(double mean, RandomStream &r);
  /*repeated calls with variable r as a randomStream input will produce 
    an exponential distribution with mean as the user specifies.
    A single random number is produced per call.  */
  boolean Flip(double probabilityOfSuccess, RandomStream &r);
  /* Given a probability of Success and a random stream to produce random 
     numbers this procedure returns TRUE for success in a Bernoulli trial */
  unsigned int Geometric(double probabilityOfSuccess, RandomStream &r);
  /*Given a probability of Success and a random stream to produce random
    numbers this procedure returns the number of steps before a success*/
  double Normal(double mean, double std, RandomStream &r);
  /*Input a randomstream to produce random numbers and this procedure produces
    a normal distribution with the user specified mean and standard deviation 
    when called repeatedly.  A single random number is produced per call.*/
  unsigned int Poisson(double arrivalRate, double timeInterval, RandomStream &r); 
  /*With a random stream to produce random numbers this procedure returns the 
    number of arrivals for a Poisson process with the user specifed arrival 
    rate and time interval*/
  unsigned int Interval(unsigned int limit, RandomStream &r);
  /*With an input of a random stream to produce random numbers and a limit
    of type unsigned int, this procedure will produce a uniform distribution over
    the interval (0..limit-1) when called repeatedly.  One random number per
    call is produced.*/
  long IntervalL(long limit, RandomStream &r);
  /*With an input of a random stream to produce random numbers and a limit
    of type long, this procedure will produce a uniform distribution over
    the interval (0..limit-1) when called repeatedly.  One random number per
    call is produced.*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -