Apache Lucene.Net 2.4.0 Class Library API

Lucene.Net.Util Namespace

Namespace hierarchy

Classes

Class Description
ArrayUtil  
BitUtil A variety of high efficiencly bit twiddling routines. (from org.apache.solr.util rev 555343)
BitVector Optimized implementation of a vector of bits. This is more-or-less like java.util.BitSet, but also includes the following:
  • a count() method, which efficiently computes the number of one bits;
  • optimized read from and write to disk;
  • inlinable get() method;
  • store and load, as bit set or d-gaps, depending on sparseness;
CloseableThreadLocal  
Constants Some useful constants.
DocIdBitSet Simple DocIdSet and DocIdSetIterator backed by a BitArray
OpenBitSet An "open" BitSet implementation that allows direct access to the array of words storing the bits.

Unlike java.util.bitset, the fact that bits are packed into an array of longs is part of the interface. This allows efficient implementation of other algorithms by someone other than the author. It also allows one to efficiently implement alternate serialization or interchange formats.

OpenBitSet
is faster than
java.util.BitSet
in most operations and *much* faster at calculating cardinality of sets and results of set operations. It can also handle sets of larger cardinality (up to 64 * 2**32-1)

The goals of
OpenBitSet
are the fastest implementation possible, and maximum code reuse. Extra safety and encapsulation may always be built on top, but if that's built in, the cost can never be removed (and hence people re-implement their own version in order to get better performance). If you want a "safe", totally encapsulated (and slower and limited) BitSet class, use
java.util.BitSet
.

Performance Results

OpenBitSetDISI  
OpenBitSetIterator  
Parameter A serializable Enum class.
PriorityQueue A PriorityQueue maintains a partial ordering of its elements such that the least element can always be found in constant time. Put()'s and pop()'s require log(size) time.
ScorerDocQueue A ScorerDocQueue maintains a partial ordering of its Scorers such that the least Scorer can always be found in constant time. Put()'s and pop()'s require log(size) time. The ordering is by Scorer.doc().
SmallFloat Floating point numbers smaller than 32 bits.
SortedVIntList  
StringHelper Methods for manipulating strings.
ToStringUtils  
UnicodeUtil  
UnicodeUtil.UTF16Result  
UnicodeUtil.UTF8Result