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 {
38 class CLabels : public CSGObject
39 {
40 public:
42  CLabels();
43 
45  virtual ~CLabels();
46 
53  virtual void ensure_valid(const char * context = NULL) = 0;
54 
59  virtual int32_t get_num_labels() const = 0;
60 
65  virtual ELabelType get_label_type() const = 0;
66 
72  virtual void add_subset(SGVector<index_t> subset);
73 
76  virtual void remove_subset();
77 
80  virtual void remove_all_subsets();
81 
87  virtual void set_value(float64_t value, int32_t idx);
88 
94  virtual float64_t get_value(int32_t idx);
95 
101  virtual void set_values(SGVector<float64_t> values);
102 
108 
109 private:
110  void init();
111 
112 protected:
113 
116 
119 };
120 }
121 #endif

SHOGUN Machine Learning Toolbox - Documentation