Collaboration diagram for DSPF_sp_erand:
void | DSPF_sp_erand (int size, void *vector, void *state) |
void DSPF_sp_erand | ( | int | size, | |
void * | vector, | |||
void * | state | |||
) |
This function is used to fill an array with exponentially distributed random numbers.These numbers are distributed assuming a rate parameter (lambda) = 1;
The output vector can be modified for an arbitrary lambda by dividing its contents by the desired value of lambda (or, preferably for speed, multiplying its contents by the precomputed value of 1/lambda) as shown in the histogram below.
size | = The size of the array to be filled. | |
vector | = The array which the user wants to fill with random values. Again, it should be of type float. | |
state | = The array which was initialized with the "DSP_urand32_init" function and maintained (but NEVER modified) by the user between subsequent calls to this function. |