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

📄 generiere_nvs_old_files.cpp

📁 一个用C语言编写的通用的隐性马尔可夫代码库
💻 CPP
字号:
/*******************************************************************************  authors      : Peter Pipenbacher  filename     : ghmm++/examples/generiere_nvs_old_files.cpp  created      : DATE: 2002-03-14  $Id: generiere_nvs_old_files.cpp,v 1.3 2002/04/03 11:16:24 pipenb Exp $  Copyright (C) 1998-2001, ZAIK/ZPR, Universit鋞 zu K鰈n    This program is free software; you can redistribute it and/or modify  it under the terms of the GNU General Public License as published by  the 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 of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  GNU General Public License for more details.    You should have received a copy of the GNU General Public License  along with this program; if not, write to the Free Software  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  *******************************************************************************/#include "ghmm++/GHMM.h"#ifdef HAVE_NAMESPACESusing namespace std;#endifint main(int argc, char* argv[]) {  unsigned int i;  int j;  double logp;    GHMM_Sequences trainingsseq(GHMM_DOUBLE);  GHMM_Sequences* genseq;  GHMM_ContinuousModel smo;  if (argc < 3) {    fprintf(stderr,"usage: generiere_nvs_old_files nvs.mod nvs.sqd [output.xml]\n");    exit(1);  }  smo.read(argv[1]);  trainingsseq.read(argv[2]);  if (argc > 3) {    GHMM_Document doc;    doc.open(argv[3],"w");    doc.writeElement(&smo);    doc.writeEndl();    doc.close();  }  smo.reestimate_baum_welch(&trainingsseq,&logp,0.00001,35);  smo.print(stdout);  for (j = 0; j < 200; j++) {    genseq = smo.generate_sequences(0,20,1,1,20);    for (i = 0; i < genseq->getLength(0); i++)       printf("%8f\n",(genseq->getDoubleSequence(0)[i]));  }  delete genseq;  //printf("Generierte Sequenzen :\n");  // sequence_d_print(stdout,genseq,0);  //printf("Eingabesequenzen: \n");  //sequence_d_print(stdout,seq[0],0);  //smodel_print(stdout,smo[0]);#ifdef WIN32  printf("\nPress ENTER\n");  fgetc(stdin);#endif return 0;  }

⌨️ 快捷键说明

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