SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
features
streaming
StreamingFeatures.h
浏览该文件的文档.
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) 2011 Shashwat Lal Das
8
* Written (W) 2012 Heiko Strathmann
9
* Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
10
*/
11
#ifndef _STREAMING_FEATURES__H__
12
#define _STREAMING_FEATURES__H__
13
14
#include <
shogun/lib/common.h
>
15
#include <
shogun/features/Features.h
>
16
#include <
shogun/io/streaming/StreamingFile.h
>
17
18
namespace
shogun
19
{
70
class
CStreamingFeatures
:
public
CFeatures
71
{
72
73
public
:
74
79
CStreamingFeatures
();
80
84
virtual
~CStreamingFeatures
();
85
92
void
set_read_functions
();
93
102
virtual
void
set_vector_reader
()=0;
103
113
virtual
void
set_vector_and_label_reader
()=0;
114
119
virtual
void
start_parser
()=0;
120
124
virtual
void
end_parser
()=0;
125
133
virtual
float64_t
get_label
()=0;
134
140
virtual
bool
get_next_example
()=0;
141
147
virtual
void
release_example
()=0;
148
154
virtual
int32_t
get_num_features
()=0;
155
161
virtual
bool
get_has_labels
();
162
173
virtual
bool
is_seekable
();
174
178
virtual
void
reset_stream
();
179
188
virtual
CFeatures
*
get_streamed_features
(
index_t
num_elements)
189
{
190
SG_ERROR
(
"%s::get_streamed_features() is not yet implemented!\n"
,
191
get_name
());
192
return
NULL;
193
}
194
195
protected
:
196
198
bool
has_labels
;
199
201
CStreamingFile
*
working_file
;
202
204
bool
seekable
;
205
206
};
207
}
208
#endif // _STREAMING_FEATURES__H__
SHOGUN
机器学习工具包 - 项目文档