SHOGUN  3.2.1
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
SequenceLabels.h
浏览该文件的文档.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2012-2013 Fernando José Iglesias García
8  * Copyright (C) 2012-2013 Fernando José Iglesias García
9  */
10 
11 #ifndef _SEQUENCE_LABELS__H__
12 #define _SEQUENCE_LABELS__H__
13 
15 #include <shogun/lib/SGVector.h>
18 
19 namespace shogun
20 {
21 
22 class CSequenceLabels;
23 
26 class CSequence : public CStructuredData
27 {
28 public:
31 
37 
39  ~CSequence() { }
40 
46  {
47  if ( base_data->get_structured_data_type() == SDT_SEQUENCE )
48  return (CSequence*) base_data;
49  else
50  SG_SERROR("base_data must be of dynamic type CSequence\n")
51 
52  return NULL;
53  }
54 
56  virtual const char* get_name() const { return "Sequence"; }
57 
59  SGVector<int32_t> get_data() const { return data; }
60 
61 protected:
64 
65 };
66 
72 {
73  public:
76 
82  CSequenceLabels(int32_t num_labels, int32_t num_states);
83 
94  CSequenceLabels(SGVector< int32_t > labels, int32_t label_length, int32_t num_labels, int32_t num_states);
95 
97  virtual ~CSequenceLabels();
98 
100  virtual const char* get_name() const { return "SequenceLabels"; }
101 
112 
117  inline int32_t get_num_states() const { return m_num_states; };
118 
119  private:
121  void init();
122 
123  private:
128  int32_t m_num_states;
129 
130 }; /* CSequenceLabels */
131 
132 } /* namespace shogun */
133 
134 #endif /* _SEQUENCE_LABELS__H__ */

SHOGUN 机器学习工具包 - 项目文档