SHOGUN
v2.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
features
CombinedFeatures.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) 2012 Heiko Strathmann
10
* Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
11
*/
12
13
#ifndef _CCOMBINEDFEATURES__H__
14
#define _CCOMBINEDFEATURES__H__
15
16
#include <
shogun/features/Features.h
>
17
#include <
shogun/lib/List.h
>
18
19
namespace
shogun
20
{
21
class
CFeatures;
22
class
CList;
23
class
CListElement;
24
37
class
CCombinedFeatures
:
public
CFeatures
38
{
39
public
:
41
CCombinedFeatures
();
43
CCombinedFeatures
(
const
CCombinedFeatures
& orig);
44
49
virtual
CFeatures
*
duplicate
()
const
;
50
52
virtual
~CCombinedFeatures
();
53
58
inline
virtual
EFeatureType
get_feature_type
()
const
59
{
60
return
F_UNKNOWN
;
61
}
62
67
inline
virtual
EFeatureClass
get_feature_class
()
const
68
{
69
return
C_COMBINED
;
70
}
71
76
inline
virtual
int32_t
get_num_vectors
()
const
77
{
78
return
m_subset_stack
->
has_subsets
()
79
?
m_subset_stack
->
get_size
() :
num_vec
;
80
}
81
86
virtual
int32_t
get_size
()
const
;
87
89
void
list_feature_objs
();
90
96
bool
check_feature_obj_compatibility
(
CCombinedFeatures
* comb_feat);
97
102
CFeatures
*
get_first_feature_obj
();
103
109
CFeatures
*
get_first_feature_obj
(
CListElement
*& current);
110
115
CFeatures
*
get_next_feature_obj
();
116
122
CFeatures
*
get_next_feature_obj
(
CListElement
*& current);
123
128
CFeatures
*
get_last_feature_obj
();
129
135
bool
insert_feature_obj
(
CFeatures
* obj);
136
142
bool
append_feature_obj
(
CFeatures
* obj);
143
148
bool
delete_feature_obj
();
149
154
int32_t
get_num_feature_obj
();
155
166
CFeatures
*
create_merged_copy
(
CFeatures
* other);
167
174
virtual
void
add_subset
(
SGVector<index_t>
subset);
175
181
virtual
void
remove_subset
();
182
188
virtual
void
remove_all_subsets
();
189
198
virtual
CFeatures
*
copy_subset
(
SGVector<index_t>
indices);
199
201
inline
virtual
const
char
*
get_name
()
const
{
return
"CombinedFeatures"
; }
202
203
private
:
204
void
init();
205
206
protected
:
208
CList
*
feature_list
;
209
213
int32_t
num_vec
;
214
};
215
}
216
#endif
SHOGUN
Machine Learning Toolbox - Documentation