Stores and iterate on sorted integers in compressed form in RAM.
More...
#include <SortedVIntList.h>
Static Public Attributes |
static const int32_t | BITS2VINTLIST_SIZE |
| When a BitSet has fewer than 1 in BITS2VINTLIST_SIZE bits set, a SortedVIntList representing the index numbers of the set bits will be smaller than that BitSet.
|
Detailed Description
Stores and iterate on sorted integers in compressed form in RAM.
The code for compressing the differences between ascending integers was borrowed from IndexInput and IndexOutput.
NOTE: this class assumes the stored integers are doc Ids (hence why it extends DocIdSet). Therefore its iterator() assumes DocIdSetIterator#NO_MORE_DOCS can be used as sentinel. If you intend to use this value, then make sure it's not used during search flow.
Constructor & Destructor Documentation
Lucene::SortedVIntList::SortedVIntList |
( |
Collection< int32_t > |
sortedInts | ) |
|
Create a SortedVIntList from all elements of an array of integers.
- Parameters
-
sortedInts | A sorted array of non negative integers. |
Lucene::SortedVIntList::SortedVIntList |
( |
Collection< int32_t > |
sortedInts, |
|
|
int32_t |
inputSize |
|
) |
| |
Create a SortedVIntList from an array of integers.
- Parameters
-
sortedInts | A sorted array of non negative integers. |
inputSize | The number of integers to be used from the array. |
Lucene::SortedVIntList::SortedVIntList |
( |
const BitSetPtr & |
bits | ) |
|
Lucene::SortedVIntList::SortedVIntList |
( |
const OpenBitSetPtr & |
bits | ) |
|
Create a SortedVIntList.
- Parameters
-
docIdSetIterator | An iterator providing document numbers as a set of integers. This DocIdSetIterator is iterated completely when this constructor is called and it must provide the integers in non decreasing order. |
virtual Lucene::SortedVIntList::~SortedVIntList |
( |
| ) |
|
|
virtual |
Member Function Documentation
static String Lucene::SortedVIntList::_getClassName |
( |
| ) |
|
|
inlinestatic |
void Lucene::SortedVIntList::addInt |
( |
int32_t |
nextInt | ) |
|
|
protected |
int32_t Lucene::SortedVIntList::getByteSize |
( |
| ) |
|
- Returns
- The size of the byte array storing the compressed sorted integers.
virtual String Lucene::SortedVIntList::getClassName |
( |
| ) |
|
|
inlinevirtual |
void Lucene::SortedVIntList::initBytes |
( |
| ) |
|
|
protected |
virtual bool Lucene::SortedVIntList::isCacheable |
( |
| ) |
|
|
virtual |
boost::shared_ptr< SortedVIntList > Lucene::SortedVIntList::shared_from_this |
( |
| ) |
|
|
inline |
int32_t Lucene::SortedVIntList::size |
( |
| ) |
|
- Returns
- The total number of sorted integers.
Field Documentation
int32_t Lucene::SortedVIntList::_size |
|
protected |
const int32_t Lucene::SortedVIntList::BIT_SHIFT |
|
staticprotected |
const int32_t Lucene::SortedVIntList::BITS2VINTLIST_SIZE |
|
static |
When a BitSet has fewer than 1 in BITS2VINTLIST_SIZE bits set, a SortedVIntList representing the index numbers of the set bits will be smaller than that BitSet.
ByteArray Lucene::SortedVIntList::bytes |
|
protected |
int32_t Lucene::SortedVIntList::lastBytePos |
|
protected |
int32_t Lucene::SortedVIntList::lastInt |
|
protected |
const int32_t Lucene::SortedVIntList::MAX_BYTES_PER_INT |
|
staticprotected |
const int32_t Lucene::SortedVIntList::VB1 |
|
staticprotected |
The documentation for this class was generated from the following file: