Rudin-Osher-Fatemi Total Variation Denoising using Split Bregman
|
Macros | |
#define | rand_unif_r(generator) |
Generate a uniform random number on (0,1) (reentrant) More... | |
#define | rand_normal_r(generator) |
Generate a standard normal distributed random number (reentrant) More... | |
#define | rand_exp_r(generator, mu) |
Generate an exponentially-distributed number (reentrant) More... | |
#define | rand_geometric_r(generator, p) |
Generate a geometrically-distributed number (reentrant) More... | |
Functions | |
randmt_t * | new_randmt () |
Create a new randmt_t. More... | |
void | free_randmt (randmt_t *generator) |
Free a randmt_t. More... | |
void | init_randmt_r (randmt_t *generator, unsigned long seed) |
Initialize randmt_t with a seed. More... | |
void | init_randmt_auto_r (randmt_t *generator) |
Initialize generator with the current time and memory address. More... | |
unsigned long | rand_uint32_r (randmt_t *generator) |
Generate a random 32-bit unsigned integer (reentrant) More... | |
double | rand_gamma_r (randmt_t *generator, double a, double b) |
Generate a Gamma-distributed number (reentrant) More... | |
double | rand_poisson_r (randmt_t *generator, double mu) |
Generate a Poisson-distributed number (reentrant) More... | |
These functions use a specified randmt_t to generate pseudorandom numbers.
#define rand_exp_r | ( | generator, | |
mu | |||
) |
Generate an exponentially-distributed number (reentrant)
generator | the randmt_t |
mu | mean parameter of the distribution (positive value) |
Generates a pseudo-random exponentially distributed value using the specified generator.
#define rand_geometric_r | ( | generator, | |
p | |||
) |
Generate a geometrically-distributed number (reentrant)
generator | the randmt_t |
p | probability of success |
Generates a pseudo-random geometrically-distributed value using the specified generator.
#define rand_normal_r | ( | generator | ) |
Generate a standard normal distributed random number (reentrant)
generator | the randmt_t |
A pseudo-random normally distributed number using the specified generator.
#define rand_unif_r | ( | generator | ) |
Generate a uniform random number on (0,1) (reentrant)
generator | the randmt_t |
This routine generates a random number uniformly on the open interval (0,1) with 53-bit resolution using the specified generator. The formula used to generate the number is
where a = integer of 27 random bits, b = integer of 26 random bits.
void free_randmt | ( | randmt_t * | generator | ) |
Free a randmt_t.
generator | the randmt_t to free |
Free memory associated to a randmt_t that was created using new_randmt().
void init_randmt_auto_r | ( | randmt_t * | generator | ) |
Initialize generator with the current time and memory address.
generator | the randmt_t |
The generator is seeded using the current time added to the memory address of the generator. The memory address is included so that different generators are initialized with different seeds. An array of generators can be initialized as
void init_randmt_r | ( | randmt_t * | generator, |
unsigned long | seed | ||
) |
Initialize randmt_t with a seed.
generator | the randmt_t |
seed | the seed value |
randmt_t* new_randmt | ( | ) |
Create a new randmt_t.
A newly-created randmt_t should be seeded with init_randmt_auto_r() or init_randmt_r(). After use, call free_randmt() to free memory associated with the randmt_t.
double rand_gamma_r | ( | randmt_t * | generator, |
double | a, | ||
double | b | ||
) |
Generate a Gamma-distributed number (reentrant)
generator | the randmt_t |
a | shape parameter (positive value) |
b | scale parameter (positive value) |
Generates a Gamma-distributed random value using the specified generator.
double rand_poisson_r | ( | randmt_t * | generator, |
double | mu | ||
) |
Generate a Poisson-distributed number (reentrant)
generator | the randmt_t |
mu | the mean parameter of the distribution (positive value) |
A pseudo-random normally distributed number using the specified generator.
unsigned long rand_uint32_r | ( | randmt_t * | generator | ) |
Generate a random 32-bit unsigned integer (reentrant)
generator | the randmt_t |
Generates a pseudorandom 32-bit integer value uniformly between 0 and 0xFFFFFFFF using the specified generator.