create_sequence.cpp

来自「一个用C语言编写的通用的隐性马尔可夫代码库」· C++ 代码 · 共 55 行

CPP
55
字号
/* @(#)create_sequence.cpp created by Peter Pipenbacher at 25 Apr 2002 * * Authors: Peter Pipenbacher (pipenb@zpr.uni-koeln.de) * * 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() {  vector<double> v;  v.push_back(0.5);  v.push_back(0.35);  v.push_back(0.75);  // init GHMM_Sequence data structure  GHMM_Sequence seq1(GHMM_DOUBLE,v.size());  for (unsigned int i = 0; i < v.size(); ++i)    seq1.setDouble(i,v[i]);  seq1.print(stdout);    // create a new GHMM_Sequences data structure from   // the GHMM_Sequence object created above  GHMM_Sequences seq2(&seq1);  seq2.print(stdout);#ifdef WIN32  printf("\nPress ENTER\n");  fgetc(stdin);#endif  return 0;}

⌨️ 快捷键说明

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