SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SequenceLabels.cpp
Go to the documentation of this file.
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 Fernando José Iglesias García
8  * Copyright (C) 2012 Fernando José Iglesias García
9  */
10 
12 
13 using namespace shogun;
14 
17 {
18 }
19 
20 CSequenceLabels::CSequenceLabels(int32_t num_labels, int32_t num_states)
21 : CStructuredLabels(num_labels), m_num_states(num_states)
22 {
23  init();
24 }
25 
27  int32_t num_labels, int32_t num_states)
28 : CStructuredLabels(num_labels), m_num_states(num_states)
29 {
30  REQUIRE(labels.vlen == label_length*num_labels, "The length of the labels must be "
31  "equal to label_length times num_labels\n");
32  init();
33 
34  for ( int32_t i = 0 ; i < labels.vlen ; i += label_length )
35  {
37  SGVector< int32_t >::clone_vector(labels.vector+i, label_length),
38  label_length));
39  }
40 }
41 
43 {
44 }
45 
47 {
49 }
50 
51 void CSequenceLabels::init()
52 {
53  SG_ADD(&m_num_states, "m_num_states", "Number of states", MS_NOT_AVAILABLE);
54 }

SHOGUN Machine Learning Toolbox - Documentation