SHOGUN
v3.0.0
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
shogun
labels
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/common.h
>
17
#include <
shogun/base/SGObject.h
>
18
#include <
shogun/labels/LabelTypes.h
>
19
#include <
shogun/labels/LabelsFactory.h
>
20
#include <
shogun/features/SubsetStack.h
>
21
22
namespace
shogun
23
{
35
class
CLabels
:
public
CSGObject
36
{
37
public
:
39
CLabels
();
40
42
virtual
~CLabels
();
43
50
virtual
void
ensure_valid
(
const
char
* context=NULL)=0;
51
56
virtual
int32_t
get_num_labels
()
const
=0;
57
62
virtual
ELabelType
get_label_type
()
const
=0;
63
69
virtual
void
add_subset
(
SGVector<index_t>
subset);
70
73
virtual
void
remove_subset
();
74
77
virtual
void
remove_all_subsets
();
78
84
virtual
void
set_value
(
float64_t
value, int32_t idx);
85
91
virtual
float64_t
get_value
(int32_t idx);
92
98
virtual
void
set_values
(
SGVector<float64_t>
values);
99
104
virtual
SGVector<float64_t>
get_values
();
105
106
private
:
107
void
init();
108
109
protected
:
110
112
CSubsetStack
*
m_subset_stack
;
113
115
SGVector<float64_t>
m_current_values
;
116
};
117
}
118
#endif
SHOGUN
Machine Learning Toolbox - Documentation