Lucene++ - a full-featured, c++ search engine
API Documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
include
SortedVIntList.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2011 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 SORTEDVINTLIST_H
8
#define SORTEDVINTLIST_H
9
10
#include "
DocIdSet.h
"
11
12
namespace
Lucene
13
{
22
class
LPPAPI
SortedVIntList
:
public
DocIdSet
23
{
24
public
:
27
SortedVIntList
(
Collection<int32_t>
sortedInts);
28
32
SortedVIntList
(
Collection<int32_t>
sortedInts, int32_t inputSize);
33
36
SortedVIntList
(
BitSetPtr
bits);
37
40
SortedVIntList
(
OpenBitSetPtr
bits);
41
46
SortedVIntList
(
DocIdSetIteratorPtr
docIdSetIterator);
47
48
virtual
~
SortedVIntList
();
49
50
LUCENE_CLASS
(
SortedVIntList
);
51
52
public
:
55
static
const
int32_t BITS2VINTLIST_SIZE;
56
57
protected
:
58
static
const
int32_t
VB1
;
59
static
const
int32_t
BIT_SHIFT
;
60
static
const
int32_t
MAX_BYTES_PER_INT
;
61
62
int32_t
_size
;
63
ByteArray
bytes
;
64
int32_t
lastBytePos
;
65
int32_t
lastInt
;
66
67
public
:
69
int32_t size();
70
72
int32_t getByteSize();
73
75
virtual
bool
isCacheable();
76
78
virtual
DocIdSetIteratorPtr
iterator();
79
80
protected
:
81
void
initBytes();
82
void
addInt(int32_t nextInt);
83
84
friend
class
SortedDocIdSetIterator;
85
};
86
}
87
88
#endif
clucene.sourceforge.net