RealFileFeatures.h

Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 1999-2009 Soeren Sonnenburg
00008  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #ifndef _DREALFILEFEATURES__H__
00012 #define _DREALFILEFEATURES__H__
00013 
00014 #include "lib/common.h"
00015 #include "features/SimpleFeatures.h"
00016 
00023 class CRealFileFeatures: public CSimpleFeatures<float64_t>
00024 {
00025     public:
00031         CRealFileFeatures(int32_t size, FILE* file);
00032 
00038         CRealFileFeatures(int32_t size, char* filename);
00039 
00041         CRealFileFeatures(const CRealFileFeatures& orig);
00042 
00043         virtual ~CRealFileFeatures();
00044 
00049         virtual float64_t* load_feature_matrix();
00050 
00056         int32_t get_label(int32_t idx);
00057 
00059         inline virtual const char* get_name() const { return "RealFileFeatures"; }
00060 
00061     protected:
00069         virtual float64_t* compute_feature_vector(
00070             int32_t num, int32_t& len, float64_t* target=NULL);
00071 
00076         bool load_base_data();
00077 
00079         FILE* working_file;
00081         char* working_filename;
00083         bool status;
00085         int32_t* labels;
00086 
00088         uint8_t intlen;
00090         uint8_t doublelen;
00092         uint32_t endian;
00094         uint32_t fourcc;
00096         uint32_t preprocd;
00098         int64_t filepos;
00099 };
00100 #endif

SHOGUN Machine Learning Toolbox - Documentation