00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INDRI_EXTENTANDNODE_HPP
00020 #define INDRI_EXTENTANDNODE_HPP
00021
00022 #include "indri/ListIteratorNode.hpp"
00023 #include <vector>
00024 #include "indri/greedy_vector"
00025
00026 class ExtentAndNode : public ListIteratorNode {
00027 private:
00028 std::vector<ListIteratorNode*> _children;
00029 greedy_vector<Extent> _extents;
00030 greedy_vector<Extent> _partialExtents;
00031 std::string _name;
00032
00033 void _and( greedy_vector<Extent>& out, const greedy_vector<Extent>& one, const greedy_vector<Extent>& two );
00034
00035 public:
00036 ExtentAndNode( const std::string& name, std::vector<ListIteratorNode*>& children );
00037 void prepare( int documentID );
00038 const greedy_vector<Extent>& extents();
00039 int nextCandidateDocument();
00040 const std::string& getName() const;
00041 void annotate( class Annotator& annotator, int documentID, int begin, int end );
00042 };
00043
00044 #endif //INDRI_EXTENTANDNODE_HPP
00045