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) 2011 Shashwat Lal Das 00008 * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society 00009 */ 00010 #ifndef __STREAMING_FILEFROMFEATURES_H__ 00011 #define __STREAMING_FILEFROMFEATURES_H__ 00012 00013 #include <shogun/io/StreamingFile.h> 00014 #include <shogun/features/Features.h> 00015 00016 namespace shogun 00017 { 00034 class CStreamingFileFromFeatures: public CStreamingFile 00035 { 00036 public: 00040 CStreamingFileFromFeatures(); 00041 00047 CStreamingFileFromFeatures(CFeatures* feat); 00048 00055 CStreamingFileFromFeatures(CFeatures* feat, float64_t* lab); 00056 00060 virtual ~CStreamingFileFromFeatures(); 00061 00067 virtual void set_features(CFeatures* feat) 00068 { 00069 ASSERT(feat); 00070 features=feat; 00071 } 00072 00078 virtual void set_labels(float64_t* lab) 00079 { 00080 ASSERT(lab); 00081 labels=lab; 00082 } 00083 00085 inline virtual const char* get_name() const 00086 { 00087 00088 return "StreamingFileFromFeatures"; 00089 00090 } 00091 00092 protected: 00093 00095 CFeatures* features; 00096 00098 float64_t* labels; 00099 }; 00100 } 00101 #endif //__STREAMING_FILEFROMFEATURES_H__