Total Variation Deconvolution using Split Bregman
|
Macros | |
#define | init_randmt(seed) (init_randmt_r(&__randmt_global_generator, seed)) |
Initialize the global generator with a seed. More... | |
#define | init_randmt_auto() (init_randmt_auto_r(&__randmt_global_generator)) |
Initialize the global generator with the current time. More... | |
#define | rand_uint32() (rand_uint32_r(&__randmt_global_generator)) |
Generate a random 32-bit unsigned integer (nonreentrant) More... | |
#define | rand_unif() (rand_unif_r(&__randmt_global_generator)) |
Generate a uniform random number on (0,1) (nonreentrant) More... | |
#define | rand_normal() (rand_normal_r(&__randmt_global_generator)) |
Generate a standard normal distributed random number (nonreentrant) More... | |
#define | rand_exp(mu) (rand_exp_r(&__randmt_global_generator, mu)) |
Generate an exponentially-distributed number (nonreentrant) More... | |
#define | rand_gamma(a, b) (rand_gamma_r(&__randmt_global_generator, a, b)) |
Generate a Gamma-distributed number (nonreentrant) More... | |
#define | rand_poisson(mu) (rand_poisson_r(&__randmt_global_generator, mu)) |
Generate a Poisson-distributed number (nonreentrant) More... | |
#define | rand_geometric(p) (rand_geometric_r(&__randmt_global_generator, p)) |
Generate a geometrically-distributed number (nonreentrant) More... | |
These functions use the global pseudorandom number generator.
#define init_randmt | ( | seed | ) | (init_randmt_r(&__randmt_global_generator, seed)) |
Initialize the global generator with a seed.
seed | the seed value |
This routine seeds the global random number generator with an unsigned 32-bit integer value.
A constant seed can be used to reproduce the same pseudorandom numbers.
#define init_randmt_auto | ( | ) | (init_randmt_auto_r(&__randmt_global_generator)) |
Initialize the global generator with the current time.
This function seeds the global generator with the current time. It should be called once at the beginning of the program so that different pseudorandom values are produced on different runs.
This function only needs to be called once. Seeding multiple times does not improve the statistical quality of the generator.
#define rand_exp | ( | mu | ) | (rand_exp_r(&__randmt_global_generator, mu)) |
Generate an exponentially-distributed number (nonreentrant)
mu | mean parameter of the distribution (positive value) |
Generates a pseudo-random value distributed with probability density
generated by inversion. The global generator is used to generate the value.
Distribution properties:
#define rand_gamma | ( | a, | |
b | |||
) | (rand_gamma_r(&__randmt_global_generator, a, b)) |
Generate a Gamma-distributed number (nonreentrant)
a | shape parameter (positive value) |
b | scale parameter (positive value) |
Generates a Gamma-distributed random value with density
where is the Gamma function, using the method of Marsaglia and Tsang, 2000. The global generator is used to generate the value.
Distribution properties:
#define rand_geometric | ( | p | ) | (rand_geometric_r(&__randmt_global_generator, p)) |
Generate a geometrically-distributed number (nonreentrant)
p | probability of success |
Generates a pseudo-random value distributed with probability mass fuction
where , generated by inversion. The global generator is used to generate the value.
Distribution properties:
#define rand_normal | ( | ) | (rand_normal_r(&__randmt_global_generator)) |
Generate a standard normal distributed random number (nonreentrant)
A pseudo-random normally distributed number with density
generated by the Box-Muller transform. The global generator is used to generate the value.
Distribution properties:
#define rand_poisson | ( | mu | ) | (rand_poisson_r(&__randmt_global_generator, mu)) |
Generate a Poisson-distributed number (nonreentrant)
mu | the mean parameter of the distribution (positive value) |
A pseudo-random normally distributed number with probability mass function
using a simple direct algorthm for mu < 10 and the "PTRS" algorthm of Hormann for larger mu. The global generator is used to generate the value.
Reference: Wolfgang Hormann, "The transformed rejection method for generating Poisson random variables," Insurance: Mathematics and Economics 12, pp. 39-45, 1993.
Distribution properties:
#define rand_uint32 | ( | ) | (rand_uint32_r(&__randmt_global_generator)) |
Generate a random 32-bit unsigned integer (nonreentrant)
The global generator is used to generate the value.
#define rand_unif | ( | ) | (rand_unif_r(&__randmt_global_generator)) |
Generate a uniform random number on (0,1) (nonreentrant)
This routine generates a random number uniformly on the open interval (0,1) with 53-bit resolution. The formula used to generate the number is
where a = integer of 27 random bits, b = integer of 26 random bits. The global generator is used to generate the value.
Distribution properties: