2.1.24.8.24 sevrnd


Contents

Description

Generates an array of random numbers from a smallest extreme value distribution

Syntax

int sevrnd( double * v, uint n, double mu, double sigma )

Parameters

v
[output] Pointer to a double array, which contain the results
n
[input] The number of pseudo-random numbers to be generated. n>=1
mu
[input] The location parameter of the smallest extreme value distribution
sigma
[input] The scale parameter of the smallest extreme value distribution

Return

Return NE_NOERROR(0) on success, otherwise error

Examples

EX

void test_sevrnd() 
{
	int n = 10;
	vector<double> vd(n);
	int nRet = sevrnd(vd, n, 0, 1.0);
	for (int i = 0; i < n; i++) 
	{
		printf("%f\t", vd[i]);
	}
	printf("\n");
}

Remark

See Also

Header to Include

origin.h

Reference