Total Variation Deconvolution using Split Bregman
|
Mersenne Twister MT19937 pseudorandom number generator. More...
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <time.h>
#include "randmt.h"
Go to the source code of this file.
Data Structures | |
struct | randmtstruct_t |
An MT19937 pseudo-random number generator. More... | |
Macros | |
#define | M_LOGSQRT2PI 0.9189385332046727417803297 |
The constant . | |
#define | MT_N 624 |
#define | MT_M 397 |
#define | MT_MATRIX_A 0x9908B0DFUL |
#define | MT_UPPER_MASK 0x80000000UL |
#define | MT_LOWER_MASK 0x7FFFFFFFUL |
Typedefs | |
typedef struct randmtstruct_t | randmttype_t |
An MT19937 pseudo-random number generator. | |
Functions | |
randmt_t * | new_randmt (void) |
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... | |
static double | logfactorial (double n) |
double | rand_poisson_r (randmt_t *generator, double mu) |
Generate a Poisson-distributed number (reentrant) More... | |
Variables | |
randmt_t | __randmt_global_generator = {{0}, MT_N + 1} |
Global randmt_t, used with the global versions of the functions. | |
Mersenne Twister MT19937 pseudorandom number generator.
Copyright (C) 1997-2002, Makoto Matsumoto and Takuji Nishimura
Copyright (C) 2008, Seiji Nishimura seiji 1976 @gmai l.co m
Copyright (C) 2010-2011 Nicolas Limare nicol as.l imare @cml a.ens -cac han.f r
Copyright (C) 2011, Pascal Getreuer getre uer@ gmail .com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file randmt.c.