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 <shogun/lib/common.h>
00015 #include <shogun/features/SimpleFeatures.h>
00016 
00017 namespace shogun
00018 {
00025 class CRealFileFeatures: public CSimpleFeatures<float64_t>
00026 {
00027     public:
00029         CRealFileFeatures();
00030 
00036         CRealFileFeatures(int32_t size, FILE* file);
00037 
00043         CRealFileFeatures(int32_t size, char* filename);
00044 
00046         CRealFileFeatures(const CRealFileFeatures& orig);
00047 
00048         virtual ~CRealFileFeatures();
00049 
00054         virtual float64_t* load_feature_matrix();
00055 
00061         int32_t get_label(int32_t idx);
00062 
00064         inline virtual const char* get_name() const { return "RealFileFeatures"; }
00065 
00066     protected:
00074         virtual float64_t* compute_feature_vector(
00075             int32_t num, int32_t& len, float64_t* target=NULL);
00076 
00081         bool load_base_data();
00082 
00083     protected:
00085         FILE* working_file;
00087         char* working_filename;
00089         bool status;
00091         int32_t* labels;
00092 
00094         uint8_t intlen;
00096         uint8_t doublelen;
00098         uint32_t endian;
00100         uint32_t fourcc;
00102         uint32_t preprocd;
00104         int64_t filepos;
00105 };
00106 }
00107 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation