⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rng.c

📁 一个通用的隐性马尔可夫C代码库 开发环境:C语言 简要说明:这是一个通用的隐性马尔可夫C代码库
💻 C
字号:
/*******************************************************************************  author       : Alexander Schliep  filename     : ghmm/ghmm/rng.c  created      : ?  $Id: rng.c,v 1.4 2003/12/19 15:06:17 cic99 Exp $Copyright (C) 1998-2001, ZAIK/ZPR, Universit鋞 zu K鰈nThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*******************************************************************************/#include <stdio.h>#include <gsl/gsl_rng.h>#include "rng.h"#include "math.h"#include "time.h"/* The global RNG */gsl_rng * RNG;void gsl_rng_init(void){   gsl_rng_env_setup(); /* rng is choosen according to GSL_RNG_TYPE env var */   RNG = gsl_rng_alloc(gsl_rng_default);}void gsl_rng_timeseed(gsl_rng * r){  unsigned long tm; /* Time seed */  unsigned int timeseed;    timeseed = time(NULL);  srand(timeseed);  tm = rand();  gsl_rng_set(r, tm);  //printf("# using GSL rng '%s' seed=%ld\n", gsl_rng_name(r), tm);    fflush(stdout);}/* End of: rng.c */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -