Initial import into git.
[galago.git] / cpp / galago / include / Accumulators.hpp
blob29995aed08be7da7d29598b73098e48b4c1ac15a
2 //
3 // Accumulators
4 //
5 // 23 February 2007 -- tds
6 //
7 // This interface abstracts the accumulator collection so we
8 // can use different implementations.
9 //
11 #ifndef GALAGO_ACCUMULATORS_HPP
12 #define GALAGO_ACCUMULATORS_HPP
14 class Accumulators {
15 public:
16 virtual ~Accumulators() {};
18 virtual bool canIgnoreFuturePostings( int requested ) = 0;
19 virtual int size() = 0;
20 virtual std::vector<indri::api::ScoredExtentResult> topResults( int requested ) = 0;
21 virtual int totalUnseen() = 0;
22 virtual void processBin( int score, BinOrderedBinnedIterator* iterator ) = 0;
23 virtual void processBin( int score, int termIndex, BinOrderedBinnedIterator* iterator ) = 0;
24 virtual void setMaxUnseen( int termIndex, int score ) = 0;
25 virtual void trim() = 0;
26 virtual void calculateThresholdScore( int requested ) = 0;
27 virtual void setThresholdScore( int threshold ) = 0;
28 virtual int maxTerms() const = 0;
29 virtual int threshold() const = 0;
32 #endif // GALAGO_ACCUMULATORS_HPP