SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Labels.h
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) 1999-2009 Soeren Sonnenburg
8  * Written (W) 1999-2008 Gunnar Raetsch
9  * Written (W) 2011-2012 Heiko Strathmann
10  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
11  */
12 
13 #ifndef _LABELS__H__
14 #define _LABELS__H__
15 
16 #include <shogun/lib/config.h>
17 
18 #include <shogun/lib/common.h>
19 #include <shogun/base/SGObject.h>
23 #include <shogun/lib/SGVector.h>
24 
25 namespace shogun
26 {
43 class CLabels : public CSGObject
44 {
45 public:
47  CLabels();
48 
50  virtual ~CLabels();
51 
58  virtual void ensure_valid(const char * context = NULL) = 0;
59 
64  virtual int32_t get_num_labels() const = 0;
65 
70  virtual ELabelType get_label_type() const = 0;
71 
80  virtual void add_subset(SGVector<index_t> subset);
81 
89  virtual void add_subset_in_place(SGVector<index_t> subset);
90 
93  virtual void remove_subset();
94 
97  virtual void remove_all_subsets();
98 
104  virtual void set_value(float64_t value, int32_t idx);
105 
111  virtual float64_t get_value(int32_t idx);
112 
118  virtual void set_values(SGVector<float64_t> values);
119 
125 
126 private:
127  void init();
128 
129 protected:
130 
133 
136 };
137 }
138 #endif

SHOGUN Machine Learning Toolbox - Documentation