📄 rng.h
字号:
/********************************************************************************* This file is part of the General Hidden Markov Model Library,* GHMM version 0.8_beta1, see http://ghmm.org** Filename: ghmm/ghmm/rng.h* Authors: Alexander Schliep, Ben Rich** Copyright (C) 1998-2004 Alexander Schliep * Copyright (C) 1998-2001 ZAIK/ZPR, Universitaet zu Koeln* Copyright (C) 2002-2004 Max-Planck-Institut fuer Molekulare Genetik, * Berlin* * Contact: schliep@ghmm.org ** This library is free software; you can redistribute it and/or* modify it under the terms of the GNU Library General Public* License as published by the Free Software Foundation; either* version 2 of the License, or (at your option) any later version.** This library is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU* Library General Public License for more details.** You should have received a copy of the GNU Library General Public* License along with this library; if not, write to the Free* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*** This file is version $Revision: 1639 $ * from $Date: 2006-07-05 23:18:57 +0200 (Wed, 05 Jul 2006) $* last change by $Author: grunau $.********************************************************************************/#ifndef GHMM_RNG_H#define GHMM_RNG_H/* use mersenne twister as default */#ifndef GHMM_RNG_BSD#ifndef GHMM_RNG_GSL#define GHMM_RNG_MERSENNE_TWISTER#endif#endif/* ----- Mersenne Twister -------------------------------------------------- */ #ifdef GHMM_RNG_MERSENNE_TWISTERtypedef char ghmm_rng_state_t;typedef ghmm_rng_state_t GHMM_RNG;#endif /* GHMM_RNG_MERSENNE_TWISTER *//* ----- BSD --------------------------------------------------------------- */#ifdef GHMM_RNG_BSD#include <stdlib.h>typedef char ghmm_rng_state_t[8];typedef ghmm_rng_state_t GHMM_RNG;#endif /* GHMM_RNG_BSD *//* ----- GSL --------------------------------------------------------------- */#ifdef GHMM_RNG_GSL#include <gsl/gsl_rng.h>#include <gsl/gsl_randist.h>/* Types defined in GSL */typedef gsl_rng GHMM_RNG;#endif /* GHMM_RNG_GSL *//** @name rng Initialization for the random number generator *//** */extern GHMM_RNG *RNG;#ifdef __cplusplusextern "C" {#endif/** */ void ghmm_rng_init (void);/** */ void ghmm_rng_timeseed (GHMM_RNG * r);/* ----- Mersenne Twister and BSD RNG -------------------------------------- */#ifndef GHMM_RNG_GSL/* Functions */#define GHMM_RNG_SET ghmm_rng_set#define GHMM_RNG_UNIFORM ghmm_rng_uniform#define GHMM_RNG_NAME ghmm_rng_name void ghmm_rng_set (GHMM_RNG * aState, unsigned long int seed); double ghmm_rng_uniform (GHMM_RNG * r); const char *ghmm_rng_name (GHMM_RNG * r);#endif /* not GHMM_RNG_GSL */#ifdef __cplusplus}#endif#endif /* GHMM_RNG_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -