SHOGUN
v3.2.0
|
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) 2012-2013 Heiko Strathmann 00008 */ 00009 00010 #ifndef __MEANSHIFTDATAGENERATOR_H_ 00011 #define __MEANSHIFTDATAGENERATOR_H_ 00012 00013 #include <shogun/lib/common.h> 00014 #include <shogun/features/streaming/StreamingDenseFeatures.h> 00015 00016 namespace shogun 00017 { 00018 00019 00032 class CMeanShiftDataGenerator: public CStreamingDenseFeatures<float64_t> 00033 { 00034 public: 00036 CMeanShiftDataGenerator(); 00037 00044 CMeanShiftDataGenerator(float64_t mean_shift, index_t dimension, 00045 index_t m_dimension_shift=0); 00046 00048 virtual ~CMeanShiftDataGenerator(); 00049 00051 virtual const char* get_name() const 00052 { 00053 return "MeanShiftDataGenerator"; 00054 } 00055 00062 void set_mean_shift_model(float64_t mean_shift, index_t dimension, 00063 index_t m_dimension_shift=0); 00064 00066 bool get_next_example(); 00067 00069 void release_example(); 00070 00071 private: 00073 void init(); 00074 00075 protected: 00077 float64_t m_mean_shift; 00078 00080 index_t m_dimension; 00081 00083 index_t m_dimension_shift; 00084 }; 00085 00086 } 00087 00088 #endif /* __MEANSHIFTDATAGENERATOR_H_ */