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

📄 documentation.txt

📁 lavarnd是一个随机数发生器,要求 2.4.9-31 kernel以上
💻 TXT
字号:
Introduction

This package is for the convenience of those who are doing
mathematical and statistical research. We are providing this package
because it's very difficult to find any package for random number
generators on Internet, let alone open source. You may find a few in
Java language, but you can hardly find any in C.
		     
This package is a virtually complete suite of random number
generators. It is able to generate random numbers for various
distributions. It is normal to provide uniform, normal, poisson, but
such distribution as chisquare and exponential are seldom heard of.

Function Usage

int P(int m, int n)
return:
Do calculation of (m permutates n), if n >= m >= 0; otherwise 0.
where n >= m >= 0
parameters:
	m: the super script
	n: the subscript

int factor(int n)
return:
A positive integer value of n! if n >= 0; otherwise 0.
parameters:
	n: the factor
	

int C(int m, int n)
return:
	A positive integer value of (m choose n) if n >= m >= 0; otherwise 0.
parameters:
	m: the super script
	n: the subscript

double uniform()
return:
	A positive double random number ranged within [0, 1)


int bernoulli(double p)
return:
	A random number in Bernoulli trial.
Parameter:
	p: a double value in of probability to be used.



int binomial(double p, int n)
return:
	A random number in Binomial distribution.
parameter:
	p: a double value in of probability to be used.
	n: the number of Bernoulli trial



double negativeBinomial(double p, int r)
return:
	A random number in negative binomial distribution.
parameter:
	p: a double value in of probability to be used.
	r: 



int poisson(int lambda)
return:
	A random integer number in Poisson distribution with a mean value of lambda
parameter:
	lambda: mean value of this poisson distribution.


double exponential(double lambda)
return:
	A random double number in exponential distribution with lambda
parameter:
	lambda: the inverse of mean value.



double geometric(double p)
return:
	A random double number in geometric distribution
parameter:
	p: a double value in of probability to be used.



double normalhelper()
return:
	A random double number in normal distribution with mean value of 0 and standard deviation of 1.



double normal(double mu, double sigma)
return:
	A random double number in normal distribution with mean value of "mean" and standard deviation of "stdev".
parameter:
	mu: mean value
	sigma: standard deviation.



double weibull(double k, double lambda)
return:
	A random double number in a two-parameter weibull distribution
parameter:
	k: mean value
	lambda: standard deviation.


double lognormal(double mu, double sigma)
return:
	A random double number in log-normal distribution
parameter:
	mu: mean value of the log of distribution
	sigma: standard deviation of the log of distribution.


double t(int dof)
return:
	A random double number in t-distribution
parameter:
	dof : Degree of freedom



double chisquare(int dof)
return:
	A random double number in chi-square distribution
parameter:
	dof : Degree of freedom



double F(int m, int n)
return:
	A random double number in F-distribution
parameter:
	m : Degree of freedom of the first chi-square distribution
	n : Degree of freedom of the second chi-square distribution



double erlang(int k, double rate)
return:
	A random double number in Erlang distribution
parameter:
	k    : shape parameter
	rate : rate parameter

⌨️ 快捷键说明

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