00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INDRI_ORDEREDWINDOWNODE_HPP
00020 #define INDRI_ORDEREDWINDOWNODE_HPP
00021
00022 #include "indri/ListIteratorNode.hpp"
00023 #include <vector>
00024 #include <indri/greedy_vector>
00025 #include <assert.h>
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 class OrderedWindowNode : public ListIteratorNode {
00044 private:
00045 struct extents_pointer {
00046 greedy_vector<Extent>::const_iterator iter;
00047 greedy_vector<Extent>::const_iterator end;
00048 };
00049 int _windowSize;
00050 std::vector<ListIteratorNode*> _children;
00051 greedy_vector<Extent> _extents;
00052 std::vector<extents_pointer> _pointers;
00053 std::string _name;
00054
00055 public:
00056 OrderedWindowNode( const std::string& name, const std::vector<ListIteratorNode*>& children );
00057 OrderedWindowNode( const std::string& name, const std::vector<ListIteratorNode*>& children, int windowSize );
00058 int nextCandidateDocument();
00059 void prepare( int documentID );
00060 const greedy_vector<Extent>& extents();
00061 const std::string& getName() const ;
00062 void annotate( class Annotator& annotator, int documentID, int begin, int end );
00063 };
00064
00065 #endif // INDRI_ORDEREDWINDOWNODE_HPP
00066