SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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

SHOGUN Machine Learning Toolbox - Documentation