21 template <
class ST>
class SGString;
22 template <
class ST>
class SGSparseVector;
45 CFile(FILE* f,
const char* name=NULL);
54 CFile(
int fd,
const char* mode,
const char* name=NULL);
63 CFile(
const char* fname,
char rw=
'r',
const char* name=NULL);
80 #ifndef SWIG // SWIG should skip this
119 virtual void get_vector(
bool*& vector, int32_t& len);
147 bool*& matrix, int32_t& num_feat, int32_t& num_vec);
149 uint8_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
151 int8_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
153 char*& matrix, int32_t& num_feat, int32_t& num_vec){};
155 int32_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
157 uint32_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
159 int64_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
161 uint64_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
163 float32_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
165 float64_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
167 floatmax_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
169 int16_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
171 uint16_t*& matrix, int32_t& num_feat, int32_t& num_vec){};
187 uint8_t*& array, int32_t*& dims, int32_t& num_dims){};
189 char*& array, int32_t*& dims, int32_t& num_dims){};
191 int32_t*& array, int32_t*& dims, int32_t& num_dims){};
193 float32_t*& array, int32_t*& dims, int32_t& num_dims){};
195 float64_t*& array, int32_t*& dims, int32_t& num_dims){};
197 int16_t*& array, int32_t*& dims, int32_t& num_dims){};
199 uint16_t*& array, int32_t*& dims, int32_t& num_dims){};
284 int32_t& max_string_len);
287 int32_t& max_string_len){};
290 int32_t& max_string_len){};
293 int32_t& max_string_len){};
296 int32_t& max_string_len){};
299 int32_t& max_string_len){};
302 int32_t& max_string_len){};
305 int32_t& max_string_len){};
308 int32_t& max_string_len){};
311 int32_t& max_string_len){};
314 int32_t& max_string_len){};
317 int32_t& max_string_len){};
320 int32_t& max_string_len){};
333 virtual void set_vector(
const bool* vector, int32_t len);
334 virtual void set_vector(
const int8_t* vector, int32_t len){};
335 virtual void set_vector(
const uint8_t* vector, int32_t len){};
337 virtual void set_vector(
const int32_t* vector, int32_t len){};
338 virtual void set_vector(
const uint32_t* vector, int32_t len){};
342 virtual void set_vector(
const int16_t* vector, int32_t len){};
343 virtual void set_vector(
const uint16_t* vector, int32_t len){};
344 virtual void set_vector(
const int64_t* vector, int32_t len){};
345 virtual void set_vector(
const uint64_t* vector, int32_t len){};
357 const bool* matrix, int32_t num_feat, int32_t num_vec);
359 const uint8_t* matrix, int32_t num_feat, int32_t num_vec){};
361 const int8_t* matrix, int32_t num_feat, int32_t num_vec){};
363 const char* matrix, int32_t num_feat, int32_t num_vec){};
365 const int32_t* matrix, int32_t num_feat, int32_t num_vec){};
367 const uint32_t* matrix, int32_t num_feat, int32_t num_vec){};
369 const int64_t* matrix, int32_t num_feat, int32_t num_vec){};
371 const uint64_t* matrix, int32_t num_feat, int32_t num_vec){};
373 const float32_t* matrix, int32_t num_feat, int32_t num_vec){};
375 const float64_t* matrix, int32_t num_feat, int32_t num_vec){};
377 const floatmax_t* matrix, int32_t num_feat, int32_t num_vec){};
379 const int16_t* matrix, int32_t num_feat, int32_t num_vec){};
381 const uint16_t* matrix, int32_t num_feat, int32_t num_vec){};
492 virtual const char*
get_name()
const {
return "File"; }
501 #endif // #ifndef SWIG
virtual void get_string_list(SGString< floatmax_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void set_string_list(const SGString< uint8_t > *strings, int32_t num_str)
virtual void get_string_list(SGString< uint8_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void get_string_list(SGString< uint32_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void set_sparse_matrix(const SGSparseVector< bool > *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_vector(int8_t *&vector, int32_t &len)
virtual void get_vector(int32_t *&vector, int32_t &len)
virtual void set_sparse_matrix(const SGSparseVector< int8_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_sparse_matrix(SGSparseVector< int16_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_matrix(int32_t *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void set_sparse_matrix(const SGSparseVector< float32_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void set_vector(const uint32_t *vector, int32_t len)
virtual void set_matrix(const bool *matrix, int32_t num_feat, int32_t num_vec)
virtual void set_vector(const uint8_t *vector, int32_t len)
virtual void get_matrix(uint32_t *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_vector(uint64_t *&vector, int32_t &len)
virtual void set_vector(const float32_t *vector, int32_t len)
virtual void get_sparse_matrix(SGSparseVector< uint16_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_matrix(float64_t *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void set_sparse_matrix(const SGSparseVector< int64_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_string_list(SGString< int64_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void get_matrix(floatmax_t *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_vector(floatmax_t *&vector, int32_t &len)
virtual void get_string_list(SGString< int8_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void get_sparse_matrix(SGSparseVector< float32_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void set_string_list(const SGString< bool > *strings, int32_t num_str)
virtual void get_string_list(SGString< uint16_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void set_string_list(const SGString< int32_t > *strings, int32_t num_str)
virtual void set_sparse_matrix(const SGSparseVector< int16_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void set_sparse_vector(const SGSparseVectorEntry< bool > *entries, int32_t num_feat)
virtual void set_matrix(const uint8_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_vector(float32_t *&vector, int32_t &len)
virtual void set_matrix(const int64_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_string_list(SGString< char > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void get_matrix(uint64_t *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_ndarray(char *&array, int32_t *&dims, int32_t &num_dims)
virtual void set_matrix(const uint64_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_matrix(char *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_matrix(uint8_t *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual const char * get_name() const
virtual void set_matrix(const uint32_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_matrix(int64_t *&matrix, int32_t &num_feat, int32_t &num_vec)
FILE * get_file_descriptor()
virtual void set_sparse_matrix(const SGSparseVector< uint32_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_matrix(uint16_t *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void set_matrix(const char *matrix, int32_t num_feat, int32_t num_vec)
virtual void set_sparse_matrix(const SGSparseVector< uint16_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_string_list(SGString< int32_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void get_vector(uint16_t *&vector, int32_t &len)
virtual void set_matrix(const int32_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_sparse_matrix(SGSparseVector< int8_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_ndarray(int32_t *&array, int32_t *&dims, int32_t &num_dims)
Class SGObject is the base class of all shogun objects.
virtual void get_ndarray(float32_t *&array, int32_t *&dims, int32_t &num_dims)
virtual void get_vector(bool *&vector, int32_t &len)
virtual void get_sparse_matrix(SGSparseVector< int64_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_sparse_matrix(SGSparseVector< float64_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_matrix(float32_t *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_string_list(SGString< float64_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void get_matrix(bool *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void set_sparse_matrix(const SGSparseVector< int32_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_vector(float64_t *&vector, int32_t &len)
virtual void set_sparse_matrix(const SGSparseVector< float64_t > *matrix, int32_t num_feat, int32_t num_vec)
A File access base class.
virtual void get_vector(int64_t *&vector, int32_t &len)
virtual void get_ndarray(int16_t *&array, int32_t *&dims, int32_t &num_dims)
virtual void get_sparse_vector(SGSparseVectorEntry< bool > *&entries, int32_t &num_feat)
virtual void set_string_list(const SGString< float64_t > *strings, int32_t num_str)
virtual void set_sparse_matrix(const SGSparseVector< floatmax_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_ndarray(uint16_t *&array, int32_t *&dims, int32_t &num_dims)
virtual void set_string_list(const SGString< int16_t > *strings, int32_t num_str)
virtual void set_vector(const floatmax_t *vector, int32_t len)
virtual void set_string_list(const SGString< floatmax_t > *strings, int32_t num_str)
virtual void get_string_list(SGString< int16_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void get_ndarray(float64_t *&array, int32_t *&dims, int32_t &num_dims)
virtual void set_matrix(const floatmax_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void set_matrix(const uint16_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void set_matrix(const float64_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_sparse_matrix(SGSparseVector< floatmax_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_sparse_matrix(SGSparseVector< uint32_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void set_vector(const uint16_t *vector, int32_t len)
virtual void get_vector(uint8_t *&vector, int32_t &len)
virtual void get_ndarray(uint8_t *&array, int32_t *&dims, int32_t &num_dims)
virtual void set_sparse_matrix(const SGSparseVector< uint8_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void set_string_list(const SGString< uint16_t > *strings, int32_t num_str)
virtual void set_string_list(const SGString< int64_t > *strings, int32_t num_str)
virtual void set_sparse_matrix(const SGSparseVector< char > *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_vector(int16_t *&vector, int32_t &len)
all of classes and functions are contained in the shogun namespace
virtual void get_vector(char *&vector, int32_t &len)
char * get_variable_name()
virtual void set_string_list(const SGString< char > *strings, int32_t num_str)
virtual void set_vector(const int64_t *vector, int32_t len)
virtual void get_sparse_matrix(SGSparseVector< char > *&matrix, int32_t &num_feat, int32_t &num_vec)
static char * read_whole_file(char *fname, size_t &len)
virtual void set_vector(const int16_t *vector, int32_t len)
template class SGSparseVectorEntry
template class SGSparseVector The assumtion is that the stored SGSparseVectorEntry* vector is orde...
virtual void set_string_list(const SGString< int8_t > *strings, int32_t num_str)
virtual void set_string_list(const SGString< uint64_t > *strings, int32_t num_str)
virtual void get_matrix(int16_t *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void set_matrix(const int16_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_string_list(SGString< float32_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void set_string_list(const SGString< float32_t > *strings, int32_t num_str)
virtual void get_string_list(SGString< uint64_t > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void get_string_list(SGString< bool > *&strings, int32_t &num_str, int32_t &max_string_len)
virtual void set_string_list(const SGString< uint32_t > *strings, int32_t num_str)
virtual void set_vector(const bool *vector, int32_t len)
virtual void get_sparse_matrix(SGSparseVector< uint8_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_sparse_matrix(SGSparseVector< uint64_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void get_sparse_matrix(SGSparseVector< bool > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void set_vector(const float64_t *vector, int32_t len)
virtual void get_matrix(int8_t *&matrix, int32_t &num_feat, int32_t &num_vec)
void set_variable_name(const char *name)
virtual void set_vector(const int32_t *vector, int32_t len)
virtual void get_sparse_matrix(SGSparseVector< int32_t > *&matrix, int32_t &num_feat, int32_t &num_vec)
virtual void set_matrix(const float32_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void get_vector(uint32_t *&vector, int32_t &len)
virtual void set_matrix(const int8_t *matrix, int32_t num_feat, int32_t num_vec)
virtual void set_vector(const uint64_t *vector, int32_t len)
virtual void set_vector(const int8_t *vector, int32_t len)
virtual void set_sparse_matrix(const SGSparseVector< uint64_t > *matrix, int32_t num_feat, int32_t num_vec)
virtual void set_vector(const char *vector, int32_t len)