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) 2013 Heiko Strathmann 00008 */ 00009 00010 #ifndef __GAUSSIANBLOBSDATAGENERATOR_H_ 00011 #define __GAUSSIANBLOBSDATAGENERATOR_H_ 00012 00013 #include <shogun/features/streaming/StreamingDenseFeatures.h> 00014 00015 namespace shogun 00016 { 00017 00030 class CGaussianBlobsDataGenerator: public CStreamingDenseFeatures<float64_t> 00031 { 00032 public: 00034 CGaussianBlobsDataGenerator(); 00035 00038 CGaussianBlobsDataGenerator(index_t sqrt_num_blobs, float64_t distance, 00039 float64_t stretch, float64_t angle); 00040 00042 virtual ~CGaussianBlobsDataGenerator(); 00043 00045 virtual const char* get_name() const 00046 { 00047 return "GaussianBlobsDataGenerator"; 00048 } 00049 00058 void set_blobs_model(index_t sqrt_num_blobs, float64_t distance, 00059 float64_t stretch, float64_t angle); 00060 00062 bool get_next_example(); 00063 00065 void release_example(); 00066 00067 private: 00069 void init(); 00070 00071 protected: 00073 index_t m_sqrt_num_blobs; 00074 00076 float64_t m_distance; 00077 00079 float64_t m_stretch; 00080 00082 float64_t m_angle; 00083 00086 SGMatrix<float64_t> m_cholesky; 00087 }; 00088 00089 } 00090 00091 #endif /* __GAUSSIANBLOBSDATAGENERATOR_H_ */