diff options
Diffstat (limited to 'extractor/sampler.h')
-rw-r--r-- | extractor/sampler.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/extractor/sampler.h b/extractor/sampler.h new file mode 100644 index 00000000..9cf321fb --- /dev/null +++ b/extractor/sampler.h @@ -0,0 +1,29 @@ +#ifndef _SAMPLER_H_ +#define _SAMPLER_H_ + +#include <memory> + +using namespace std; + +class PhraseLocation; +class SuffixArray; + +class Sampler { + public: + Sampler(shared_ptr<SuffixArray> suffix_array, int max_samples); + + virtual ~Sampler(); + + virtual PhraseLocation Sample(const PhraseLocation& location) const; + + protected: + Sampler(); + + private: + int Round(double x) const; + + shared_ptr<SuffixArray> suffix_array; + int max_samples; +}; + +#endif |