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
streaming
StreamingFeatures.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) 2011 Shashwat Lal Das
8
* Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society
9
*/
10
#ifndef _STREAMING_FEATURES__H__
11
#define _STREAMING_FEATURES__H__
12
13
#include <
shogun/lib/common.h
>
14
#include <
shogun/features/Features.h
>
15
#include <
shogun/io/streaming/StreamingFile.h
>
16
17
namespace
shogun
18
{
63
class
CStreamingFeatures
:
public
CFeatures
64
{
65
66
public
:
67
72
CStreamingFeatures
();
73
81
CStreamingFeatures
(
CStreamingFile
* file,
bool
is_labelled, int32_t size);
82
86
virtual
~CStreamingFeatures
() { }
87
94
void
set_read_functions
();
95
104
virtual
void
set_vector_reader
()=0;
105
115
virtual
void
set_vector_and_label_reader
()=0;
116
121
virtual
void
start_parser
()=0;
122
126
virtual
void
end_parser
()=0;
127
135
virtual
float64_t
get_label
()=0;
136
142
virtual
bool
get_next_example
()=0;
143
149
virtual
void
release_example
()=0;
150
156
virtual
int32_t
get_num_features
()=0;
157
163
virtual
bool
get_has_labels
();
164
175
virtual
bool
is_seekable
();
176
180
virtual
void
reset_stream
();
181
182
protected
:
183
185
bool
has_labels
;
186
188
CStreamingFile
*
working_file
;
189
191
bool
seekable
;
192
193
};
194
}
195
#endif // _STREAMING_FEATURES__H__
SHOGUN
Machine Learning Toolbox - Documentation