SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
RealFileFeatures.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  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9  */
10 
11 #ifndef _DREALFILEFEATURES__H__
12 #define _DREALFILEFEATURES__H__
13 
14 #include <shogun/lib/config.h>
15 
16 #include <shogun/lib/common.h>
18 
19 namespace shogun
20 {
27 class CRealFileFeatures: public CDenseFeatures<float64_t>
28 {
29  public:
32 
38  CRealFileFeatures(int32_t size, FILE* file);
39 
45  CRealFileFeatures(int32_t size, char* filename);
46 
49 
50  virtual ~CRealFileFeatures();
51 
56  virtual float64_t* load_feature_matrix();
57 
63  int32_t get_label(int32_t idx);
64 
66  virtual const char* get_name() const { return "RealFileFeatures"; }
67 
68  protected:
77  int32_t num, int32_t& len, float64_t* target=NULL);
78 
83  bool load_base_data();
84 
85  private:
87  void init();
88 
89  protected:
91  FILE* working_file;
95  bool status;
97  int32_t* labels;
98 
100  uint8_t intlen;
102  uint8_t doublelen;
104  uint32_t endian;
106  uint32_t fourcc;
108  uint32_t preprocd;
110  int64_t filepos;
111 };
112 }
113 #endif
The class DenseFeatures implements dense feature matrices.
Definition: LDA.h:40
int32_t get_label(int32_t idx)
virtual float64_t * load_feature_matrix()
double float64_t
Definition: common.h:50
virtual float64_t * compute_feature_vector(int32_t num, int32_t &len, float64_t *target=NULL)
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
The class RealFileFeatures implements a dense double-precision floating point matrix from a file...
virtual const char * get_name() const

SHOGUN Machine Learning Toolbox - Documentation