Yeppp!
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
WELL 1024a random number generator

Functions

enum YepStatus yepRandom_WELL1024a_Init (struct YepRandom_WELL1024a *restrict state)
 Initializes the state of WELL1024a pseudo-random number generator with the default seed. More...
 
enum YepStatus yepRandom_WELL1024a_Init_V32u (struct YepRandom_WELL1024a *restrict state, const Yep32u seed[32])
 Initializes the state of WELL1024a pseudo-random number generator with the specified seed. More...
 
enum YepStatus yepRandom_WELL1024a_GenerateDiscreteUniform__V32u (struct YepRandom_WELL1024a *restrict state, Yep32u *restrict samples, YepSize length)
 Generates random 32-bit samples with WELL1024a pseudo-random number generator. More...
 
enum YepStatus yepRandom_WELL1024a_GenerateDiscreteUniform_S32uS32u_V32u (struct YepRandom_WELL1024a *restrict state, Yep32u supportMin, Yep32u supportMax, Yep32u *restrict samples, YepSize length)
 Generates random 32-bit samples in the specified range with WELL1024a pseudo-random number generator. More...
 
enum YepStatus yepRandom_WELL1024a_GenerateUniform_S32fS32f_V32f_Acc32 (struct YepRandom_WELL1024a *restrict state, Yep32f supportMin, Yep32f supportMax, Yep32f *restrict samples, YepSize length)
 Generates random single precision floating-point samples in the specified range with WELL1024a pseudo-random number generator and 32-bit accuracy. More...
 
enum YepStatus yepRandom_WELL1024a_GenerateFPUniform_S32fS32f_V32f (struct YepRandom_WELL1024a *restrict state, Yep32f supportMin, Yep32f supportMax, Yep32f *restrict samples, YepSize length)
 Generates random single precision floating-point samples in the specified range with WELL1024a pseudo-random number generator. More...
 
enum YepStatus yepRandom_WELL1024a_GenerateUniform_S64fS64f_V64f_Acc32 (struct YepRandom_WELL1024a *restrict state, Yep64f supportMin, Yep64f supportMax, Yep64f *restrict samples, YepSize length)
 Generates random double precision floating-point samples in the specified range with WELL1024a pseudo-random number generator and 32-bit accuracy. More...
 
enum YepStatus yepRandom_WELL1024a_GenerateUniform_S64fS64f_V64f_Acc64 (struct YepRandom_WELL1024a *restrict state, Yep64f supportMin, Yep64f supportMax, Yep64f *restrict samples, YepSize length)
 Generates random double precision floating-point samples in the specified range with WELL1024a pseudo-random number generator and 64-bit accuracy. More...
 
enum YepStatus yepRandom_WELL1024a_GenerateFPUniform_S64fS64f_V64f (struct YepRandom_WELL1024a *restrict state, Yep64f supportMin, Yep64f supportMax, Yep64f *restrict samples, YepSize length)
 Generates random double precision floating-point samples in the specified range with WELL1024a pseudo-random number generator. More...
 

Detailed Description

Function Documentation

enum YepStatus yepRandom_WELL1024a_Init ( struct YepRandom_WELL1024a *restrict  state)

Initializes the state of WELL1024a pseudo-random number generator with the default seed.

Default seed is fixed, and never changes during execution of a program.

Parameters
[out]statePointer to a WELL1024a random number generator state to be initialized.
Return values
YepStatusOkThe random number generator is successfully initialized.
YepStatusNullPointerThe state pointer is null.
YepStatusMisalignedPointerThe state pointer is not naturally aligned.
Examples:
Polynomial.c.
enum YepStatus yepRandom_WELL1024a_Init_V32u ( struct YepRandom_WELL1024a *restrict  state,
const Yep32u  seed[32] 
)

Initializes the state of WELL1024a pseudo-random number generator with the specified seed.

Parameters
[out]statePointer to a WELL1024a random number generator state to be initialized.
[in]seedThe 1024-bit initial seed for the random number generator.
Return values
YepStatusOkThe random number generator is successfully initialized.
YepStatusNullPointerEither state or seed pointer is null.
YepStatusMisalignedPointerEither state or seed pointer is not naturally aligned.
enum YepStatus yepRandom_WELL1024a_GenerateDiscreteUniform__V32u ( struct YepRandom_WELL1024a *restrict  state,
Yep32u *restrict  samples,
YepSize  length 
)

Generates random 32-bit samples with WELL1024a pseudo-random number generator.

Each 32-bit number is generated with the same probability.

Parameters
[in,out]statePointer to the WELL1024a random number generator state.
[out]samplesPointer to the output array for generated numbers.
[in]lengthLength of the output array.
Return values
YepStatusOkThe random number generator is successfully initialized.
YepStatusNullPointerEither state or samples pointer is null.
YepStatusMisalignedPointerEither state or samples pointer is not naturally aligned.
enum YepStatus yepRandom_WELL1024a_GenerateDiscreteUniform_S32uS32u_V32u ( struct YepRandom_WELL1024a *restrict  state,
Yep32u  supportMin,
Yep32u  supportMax,
Yep32u *restrict  samples,
YepSize  length 
)

Generates random 32-bit samples in the specified range with WELL1024a pseudo-random number generator.

All numbers between supportMin (inclusive) and supportMax (inclusive) are generated with the same probability.

Parameters
[in,out]statePointer to the WELL1024a random number generator state.
[in]supportMinThe lower bound (inclusive) of the range of the generated samples.
[in]supportMaxThe upper bound (inclusive) of the range of the generated samples.
[out]samplesPointer to the output array for generated numbers.
[in]lengthLength of the output array.
Return values
YepStatusOkThe random number generator is successfully initialized.
YepStatusNullPointerEither state or samples pointer is null.
YepStatusMisalignedPointerEither state or samples pointer is not naturally aligned.
YepStatusInvalidArgumentIf supportMin is not less than supportMax.
enum YepStatus yepRandom_WELL1024a_GenerateUniform_S32fS32f_V32f_Acc32 ( struct YepRandom_WELL1024a *restrict  state,
Yep32f  supportMin,
Yep32f  supportMax,
Yep32f *restrict  samples,
YepSize  length 
)

Generates random single precision floating-point samples in the specified range with WELL1024a pseudo-random number generator and 32-bit accuracy.

All real numbers between supportMin (inclusive) and supportMax (inclusive) are generated with the same probability.

Parameters
[in,out]statePointer to the WELL1024a random number generator state.
[in]supportMinThe lower bound (inclusive) of the range of the generated samples.
[in]supportMaxThe upper bound (inclusive) of the range of the generated samples.
[out]samplesPointer to the output array for generated numbers.
[in]lengthLength of the output array.
Return values
YepStatusOkThe random number generator is successfully initialized.
YepStatusNullPointerEither state or samples pointer is null.
YepStatusMisalignedPointerEither state or samples pointer is not naturally aligned.
YepStatusInvalidArgumentIf supportMin is not less than supportMax, or any of the bounds is not finite.
enum YepStatus yepRandom_WELL1024a_GenerateFPUniform_S32fS32f_V32f ( struct YepRandom_WELL1024a *restrict  state,
Yep32f  supportMin,
Yep32f  supportMax,
Yep32f *restrict  samples,
YepSize  length 
)

Generates random single precision floating-point samples in the specified range with WELL1024a pseudo-random number generator.

All floating-point numbers between supportMin (inclusive) and supportMax (inclusive) are generated with the same probability.

Parameters
[in,out]statePointer to the WELL1024a random number generator state.
[in]supportMinThe lower bound (inclusive) of the range of the generated samples.
[in]supportMaxThe upper bound (inclusive) of the range of the generated samples.
[out]samplesPointer to the output array for generated numbers.
[in]lengthLength of the output array.
Return values
YepStatusOkThe random number generator is successfully initialized.
YepStatusNullPointerEither state or samples pointer is null.
YepStatusMisalignedPointerEither state or samples pointer is not naturally aligned.
YepStatusInvalidArgumentIf supportMin is not less than supportMax, or any of the bounds is not finite.
enum YepStatus yepRandom_WELL1024a_GenerateUniform_S64fS64f_V64f_Acc32 ( struct YepRandom_WELL1024a *restrict  state,
Yep64f  supportMin,
Yep64f  supportMax,
Yep64f *restrict  samples,
YepSize  length 
)

Generates random double precision floating-point samples in the specified range with WELL1024a pseudo-random number generator and 32-bit accuracy.

All real numbers between supportMin (inclusive) and supportMax (inclusive) are generated with the same probability.

Parameters
[in,out]statePointer to the WELL1024a random number generator state.
[in]supportMinThe lower bound (inclusive) of the range of the generated samples.
[in]supportMaxThe upper bound (inclusive) of the range of the generated samples.
[out]samplesPointer to the output array for generated numbers.
[in]lengthLength of the output array.
Return values
YepStatusOkThe random number generator is successfully initialized.
YepStatusNullPointerEither state or samples pointer is null.
YepStatusMisalignedPointerEither state or samples pointer is not naturally aligned.
YepStatusInvalidArgumentIf supportMin is not less than supportMax, or any of the bounds is not finite.
enum YepStatus yepRandom_WELL1024a_GenerateUniform_S64fS64f_V64f_Acc64 ( struct YepRandom_WELL1024a *restrict  state,
Yep64f  supportMin,
Yep64f  supportMax,
Yep64f *restrict  samples,
YepSize  length 
)

Generates random double precision floating-point samples in the specified range with WELL1024a pseudo-random number generator and 64-bit accuracy.

All real numbers between supportMin (inclusive) and supportMax (inclusive) are generated with the same probability.

Parameters
[in,out]statePointer to the WELL1024a random number generator state.
[in]supportMinThe lower bound (inclusive) of the range of the generated samples.
[in]supportMaxThe upper bound (inclusive) of the range of the generated samples.
[out]samplesPointer to the output array for generated numbers.
[in]lengthLength of the output array.
Return values
YepStatusOkThe random number generator is successfully initialized.
YepStatusNullPointerEither state or samples pointer is null.
YepStatusMisalignedPointerEither state or samples pointer is not naturally aligned.
YepStatusInvalidArgumentIf supportMin is not less than supportMax, or any of the bounds is not finite.
Examples:
Polynomial.c.
enum YepStatus yepRandom_WELL1024a_GenerateFPUniform_S64fS64f_V64f ( struct YepRandom_WELL1024a *restrict  state,
Yep64f  supportMin,
Yep64f  supportMax,
Yep64f *restrict  samples,
YepSize  length 
)

Generates random double precision floating-point samples in the specified range with WELL1024a pseudo-random number generator.

All floating-point numbers between supportMin (inclusive) and supportMax (inclusive) are generated with the same probability.

Parameters
[in,out]statePointer to the WELL1024a random number generator state.
[in]supportMinThe lower bound (inclusive) of the range of the generated samples.
[in]supportMaxThe upper bound (inclusive) of the range of the generated samples.
[out]samplesPointer to the output array for generated numbers.
[in]lengthLength of the output array.
Return values
YepStatusOkThe random number generator is successfully initialized.
YepStatusNullPointerEither state or samples pointer is null.
YepStatusMisalignedPointerEither state or samples pointer is not naturally aligned.
YepStatusInvalidArgumentIf supportMin is not less than supportMax, or any of the bounds is not finite.