Lucene++ - a full-featured, c++ search engine
API Documentation

OpenBitSetIterator.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3 // Distributable under the terms of either the Apache License (Version 2.0)
4 // or the GNU Lesser General Public License.
6
7 #ifndef OPENBITSETITERATOR_H
8 #define OPENBITSETITERATOR_H
9
10 #include "DocIdSetIterator.h"
11
12 namespace Lucene {
13
17 class LPPAPI OpenBitSetIterator : public DocIdSetIterator {
18 public:
19 OpenBitSetIterator(const OpenBitSetPtr& bitSet);
20 OpenBitSetIterator(LongArray bits, int32_t numWords);
21 virtual ~OpenBitSetIterator();
22
23 LUCENE_CLASS(OpenBitSetIterator);
24
25 protected:
26 LongArray arr;
27 int32_t words;
28 int32_t i;
29 int64_t word;
30 int32_t wordShift;
31 int32_t indexArray;
32 int32_t curDocId;
33
38 static const int32_t bitlist[];
39
40 public:
41 virtual int32_t nextDoc();
42 virtual int32_t advance(int32_t target);
43 virtual int32_t docID();
44
45 protected:
47 void shift();
48 };
49
50 }
51
52 #endif
Lucene::OpenBitSetIterator::curDocId
int32_t curDocId
Definition: OpenBitSetIterator.h:32
Lucene::OpenBitSetPtr
boost::shared_ptr< OpenBitSet > OpenBitSetPtr
Definition: LuceneTypes.h:543
Lucene::DocIdSetIterator
This abstract class defines methods to iterate over a set of non-decreasing doc ids. Note that this class assumes it iterates on doc Ids, and therefore NO_MORE_DOCS is set to { NO_MORE_DOCS} in order to be used as a sentinel object. Implementations of this class are expected to consider INT_MAX as an invalid value.
Definition: DocIdSetIterator.h:17
DocIdSetIterator.h
Lucene::OpenBitSetIterator::words
int32_t words
Definition: OpenBitSetIterator.h:27
Lucene::OpenBitSetIterator::wordShift
int32_t wordShift
Definition: OpenBitSetIterator.h:30
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition: LuceneObject.h:24
Lucene
Definition: AbstractAllTermDocs.h:12
Lucene::OpenBitSetIterator::indexArray
int32_t indexArray
Definition: OpenBitSetIterator.h:31
Lucene::OpenBitSetIterator
An iterator to iterate over set bits in an OpenBitSet. This is faster than nextSetBit() for iterating...
Definition: OpenBitSetIterator.h:17
Lucene::OpenBitSetIterator::word
int64_t word
Definition: OpenBitSetIterator.h:29
Lucene::OpenBitSetIterator::i
int32_t i
Definition: OpenBitSetIterator.h:28

clucene.sourceforge.net