Normal negative sampler.
More...
Go to the source code of this file.
◆ cfe_normal_negative
Samples random values from the possible outputs of normal (Gaussian) probability distribution centered on 0 and accepts or denies each sample with probability defined by the distribution.
◆ cfe_normal_negative_init()
Initializes an instance of cfe_normal_negative sampler. It assumes mean = 0.
- Parameters
-
s | A pointer to an uninitialized struct representing the sampler |
sigma | Standard deviation |
n | Precision parameter |
◆ cfe_normal_negative_free()
Frees the memory occupied by the struct members. It does not free memory occupied by the struct itself.
- Parameters
-
◆ cfe_normal_negative_sample()
Samples the discrete distribution.
- Parameters
-
res | The random number (result value will be stored here) |
s | A pointer to an instance of the sampler (initialized cfe_normal_negative struct) |
◆ cfe_normal_negative_sample_vec()
Sets the elements of the vector to random numbers with the normal_negative sampler.
◆ cfe_normal_negative_sample_mat()
Sets the elements of a matrix to random numbers with the normal_negative sampler.