SHOGUN  v3.0.0
 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/common.h>
16 
17 namespace shogun
18 {
25 class CRealFileFeatures: public CDenseFeatures<float64_t>
26 {
27  public:
30 
36  CRealFileFeatures(int32_t size, FILE* file);
37 
43  CRealFileFeatures(int32_t size, char* filename);
44 
47 
48  virtual ~CRealFileFeatures();
49 
54  virtual float64_t* load_feature_matrix();
55 
61  int32_t get_label(int32_t idx);
62 
64  virtual const char* get_name() const { return "RealFileFeatures"; }
65 
66  protected:
75  int32_t num, int32_t& len, float64_t* target=NULL);
76 
81  bool load_base_data();
82 
83  private:
85  void init();
86 
87  protected:
89  FILE* working_file;
93  bool status;
95  int32_t* labels;
96 
98  uint8_t intlen;
100  uint8_t doublelen;
102  uint32_t endian;
104  uint32_t fourcc;
106  uint32_t preprocd;
108  int64_t filepos;
109 };
110 }
111 #endif

SHOGUN Machine Learning Toolbox - Documentation