libcrbn/sampler/sampler.hpp

00001 #ifndef __sampler_hpp__
00002 #define __sampler_hpp__
00003 
00004 // Sampler :
00005 //      general sampling class.
00006 //      generates s vectors in the [0,1]^n interval.
00007 class Sampler {
00008   public:
00009         // Constructor
00010         Sampler(const int& iNSamples, const int& iNDimensions) :
00011                 _nSamples   (iNSamples),
00012                 _nDimensions(iNDimensions) {}
00013 
00014         // Destructor
00015         virtual ~Sampler() {}
00016         
00017         // Computes next sample and store it in the array
00018         // passed as argument.
00019         // Returns false if we generated the s'th sample.
00020         virtual bool next(float*) = 0;
00021 
00022   private:
00023         // Number of samples
00024         int _nSamples;
00025         // Number of dimensions
00026         int _nDimensions;
00027         // Current sample
00028         int _samplePos;
00029 };
00030 
00031 #endif // __sampler_hpp__

Generated on Tue Nov 14 15:40:08 2006 for libcrbn by  doxygen 1.5.0