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


Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
Lucene::OpenBitSetDISI Class Reference

#include <OpenBitSetDISI.h>

+ Inheritance diagram for Lucene::OpenBitSetDISI:

Public Member Functions

 OpenBitSetDISI (const DocIdSetIteratorPtr &disi, int32_t maxSize)
 Construct an OpenBitSetDISI with its bits set from the doc ids of the given DocIdSetIterator. Also give a maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.
 
 OpenBitSetDISI (int32_t maxSize)
 Construct an OpenBitSetDISI with no bits set, and a given maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.
 
virtual ~OpenBitSetDISI ()
 
virtual String getClassName ()
 
boost::shared_ptr< OpenBitSetDISIshared_from_this ()
 
void inPlaceOr (const DocIdSetIteratorPtr &disi)
 Perform an in-place OR with the doc ids from a given DocIdSetIterator, setting the bit for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.
 
void inPlaceAnd (const DocIdSetIteratorPtr &disi)
 Perform an in-place AND with the doc ids from a given DocIdSetIterator, leaving only the bits set for which the doc ids are in common. These doc ids should be smaller than the maximum size passed to the constructor.
 
void inPlaceNot (const DocIdSetIteratorPtr &disi)
 Perform an in-place NOT with the doc ids from a given DocIdSetIterator, clearing all the bits for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.
 
void inPlaceXor (const DocIdSetIteratorPtr &disi)
 Perform an inplace XOR with the doc ids from a given DocIdSetIterator, flipping all the bits for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.
 
- Public Member Functions inherited from Lucene::OpenBitSet
 OpenBitSet (int64_t numBits=64)
 Constructs an OpenBitSet large enough to hold numBits.
 
 OpenBitSet (LongArray bits, int32_t numWords)
 Constructs an OpenBitSet from an existing LongArray.
 
virtual ~OpenBitSet ()
 
boost::shared_ptr< OpenBitSetshared_from_this ()
 
virtual DocIdSetIteratorPtr iterator ()
 Provides a DocIdSetIterator to access the set. This implementation can return null or EmptyDocIdSet.iterator() if there are no docs that match.
 
virtual bool isCacheable ()
 This DocIdSet implementation is cacheable.
 
int64_t capacity ()
 Returns the current capacity in bits (1 greater than the index of the last bit)
 
int64_t size ()
 Returns the current capacity of this set. Included for compatibility. This is not equal to cardinality.
 
bool isEmpty ()
 Returns true if there are no set bits.
 
LongArray getBits ()
 Returns the long[] storing the bits.
 
void setBits (LongArray bits)
 Sets a new long[] to use as the bit storage.
 
int32_t getNumWords ()
 Gets the number of longs in the array that are in use.
 
void setNumWords (int32_t numWords)
 Sets the number of longs in the array that are in use.
 
bool get (int32_t index)
 Returns true or false for the specified bit index.
 
bool fastGet (int32_t index)
 Returns true or false for the specified bit index. The index should be less than the OpenBitSet size.
 
bool get (int64_t index)
 Returns true or false for the specified bit index.
 
bool fastGet (int64_t index)
 Returns true or false for the specified bit index. The index should be less than the OpenBitSet size.
 
int32_t getBit (int32_t index)
 Returns 1 if the bit is set, 0 if not. The index should be less than the OpenBitSet size.
 
void set (int64_t index)
 Sets a bit, expanding the set size if necessary.
 
void fastSet (int32_t index)
 Sets the bit at the specified index. The index should be less than the OpenBitSet size.
 
void fastSet (int64_t index)
 Sets the bit at the specified index. The index should be less than the OpenBitSet size.
 
void set (int64_t startIndex, int64_t endIndex)
 Sets a range of bits, expanding the set size if necessary.
 
void fastClear (int32_t index)
 Clears a bit. The index should be less than the OpenBitSet size.
 
void fastClear (int64_t index)
 Clears a bit. The index should be less than the OpenBitSet size.
 
void clear (int64_t index)
 Clears a bit, allowing access beyond the current set size without changing the size.
 
void clear (int32_t startIndex, int32_t endIndex)
 Clears a range of bits. Clearing past the end does not change the size of the set.
 
void clear (int64_t startIndex, int64_t endIndex)
 Clears a range of bits. Clearing past the end does not change the size of the set.
 
bool getAndSet (int32_t index)
 Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.
 
bool getAndSet (int64_t index)
 Sets a bit and returns the previous value. The index should be less than the OpenBitSet size.
 
void fastFlip (int32_t index)
 Flips a bit. The index should be less than the OpenBitSet size.
 
void fastFlip (int64_t index)
 Flips a bit. The index should be less than the OpenBitSet size.
 
void flip (int64_t index)
 Flips a bit, expanding the set size if necessary.
 
bool flipAndGet (int32_t index)
 Flips a bit and returns the resulting bit value. The index should be less than the OpenBitSet size.
 
bool flipAndGet (int64_t index)
 Flips a bit and returns the resulting bit value. The index should be less than the OpenBitSet size.
 
void flip (int64_t startIndex, int64_t endIndex)
 Flips a range of bits, expanding the set size if necessary.
 
int64_t cardinality ()
 
int32_t nextSetBit (int32_t index)
 Returns the index of the first set bit starting at the index specified. -1 is returned if there are no more set bits.
 
int64_t nextSetBit (int64_t index)
 Returns the index of the first set bit starting at the index specified. -1 is returned if there are no more set bits.
 
virtual LuceneObjectPtr clone (const LuceneObjectPtr &other=LuceneObjectPtr())
 Return clone of this object.
 
void intersect (const OpenBitSetPtr &other)
 this = this AND other
 
void _union (const OpenBitSetPtr &other)
 this = this OR other
 
void remove (const OpenBitSetPtr &other)
 Remove all elements set in other. this = this AND_NOT other.
 
void _xor (const OpenBitSetPtr &other)
 this = this XOR other
 
void _and (const OpenBitSetPtr &other)
 see intersect
 
void _or (const OpenBitSetPtr &other)
 see union
 
void andNot (const OpenBitSetPtr &other)
 see remove
 
bool intersects (const OpenBitSetPtr &other)
 Returns true if the sets have any elements in common.
 
void ensureCapacityWords (int32_t numWords)
 Expand the LongArray with the size given as a number of words (64 bit longs). getNumWords() is unchanged by this call.
 
void ensureCapacity (int64_t numBits)
 Ensure that the LongArray is big enough to hold numBits, expanding it if necessary. getNumWords() is unchanged by this call.
 
void trimTrailingZeros ()
 Lowers numWords, the number of words in use, by checking for trailing zero words.
 
virtual bool equals (const LuceneObjectPtr &other)
 Returns true if both sets have the same bits set.
 
virtual int32_t hashCode ()
 Return hash code for this object.
 
- Public Member Functions inherited from Lucene::DocIdSet
virtual ~DocIdSet ()
 
boost::shared_ptr< DocIdSetshared_from_this ()
 
- Public Member Functions inherited from Lucene::LuceneObject
virtual ~LuceneObject ()
 
virtual void initialize ()
 Called directly after instantiation to create objects that depend on this object being fully constructed.
 
virtual int32_t compareTo (const LuceneObjectPtr &other)
 Compare two objects.
 
virtual String toString ()
 Returns a string representation of the object.
 
- Public Member Functions inherited from Lucene::LuceneSync
virtual ~LuceneSync ()
 
virtual SynchronizePtr getSync ()
 Return this object synchronize lock.
 
virtual LuceneSignalPtr getSignal ()
 Return this object signal.
 
virtual void lock (int32_t timeout=0)
 Lock this object using an optional timeout.
 
virtual void unlock ()
 Unlock this object.
 
virtual bool holdsLock ()
 Returns true if this object is currently locked by current thread.
 
virtual void wait (int32_t timeout=0)
 Wait for signal using an optional timeout.
 
virtual void notifyAll ()
 Notify all threads waiting for signal.
 

Static Public Member Functions

static String _getClassName ()
 
- Static Public Member Functions inherited from Lucene::OpenBitSet
static String _getClassName ()
 
static int64_t intersectionCount (const OpenBitSetPtr &a, const OpenBitSetPtr &b)
 Returns the popcount or cardinality of the intersection of the two sets. Neither set is modified.
 
static int64_t unionCount (const OpenBitSetPtr &a, const OpenBitSetPtr &b)
 Returns the popcount or cardinality of the union of the two sets. Neither set is modified.
 
static int64_t andNotCount (const OpenBitSetPtr &a, const OpenBitSetPtr &b)
 Returns the popcount or cardinality of "a and not b" or "intersection(a, not(b))". Neither set is modified.
 
static int64_t xorCount (const OpenBitSetPtr &a, const OpenBitSetPtr &b)
 Returns the popcount or cardinality of the exclusive-or of the two sets. Neither set is modified.
 
static int32_t bits2words (int64_t numBits)
 Returns the number of 64 bit words it would take to hold numBits.
 
- Static Public Member Functions inherited from Lucene::DocIdSet
static String _getClassName ()
 
static DocIdSetPtr EMPTY_DOCIDSET ()
 An empty {.
 

Additional Inherited Members

- Protected Member Functions inherited from Lucene::OpenBitSet
int32_t expandingWordNum (int64_t index)
 
- Protected Member Functions inherited from Lucene::LuceneObject
 LuceneObject ()
 
- Protected Attributes inherited from Lucene::OpenBitSet
LongArray bits
 
int32_t wlen
 
- Protected Attributes inherited from Lucene::LuceneSync
SynchronizePtr objectLock
 
LuceneSignalPtr objectSignal
 

Constructor & Destructor Documentation

◆ OpenBitSetDISI() [1/2]

Lucene::OpenBitSetDISI::OpenBitSetDISI ( const DocIdSetIteratorPtr disi,
int32_t  maxSize 
)

Construct an OpenBitSetDISI with its bits set from the doc ids of the given DocIdSetIterator. Also give a maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.

◆ OpenBitSetDISI() [2/2]

Lucene::OpenBitSetDISI::OpenBitSetDISI ( int32_t  maxSize)

Construct an OpenBitSetDISI with no bits set, and a given maximum size one larger than the largest doc id for which a bit may ever be set on this OpenBitSetDISI.

◆ ~OpenBitSetDISI()

virtual Lucene::OpenBitSetDISI::~OpenBitSetDISI ( )
virtual

Member Function Documentation

◆ _getClassName()

static String Lucene::OpenBitSetDISI::_getClassName ( )
inlinestatic

◆ getClassName()

virtual String Lucene::OpenBitSetDISI::getClassName ( )
inlinevirtual

Reimplemented from Lucene::OpenBitSet.

◆ inPlaceAnd()

void Lucene::OpenBitSetDISI::inPlaceAnd ( const DocIdSetIteratorPtr disi)

Perform an in-place AND with the doc ids from a given DocIdSetIterator, leaving only the bits set for which the doc ids are in common. These doc ids should be smaller than the maximum size passed to the constructor.

◆ inPlaceNot()

void Lucene::OpenBitSetDISI::inPlaceNot ( const DocIdSetIteratorPtr disi)

Perform an in-place NOT with the doc ids from a given DocIdSetIterator, clearing all the bits for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.

◆ inPlaceOr()

void Lucene::OpenBitSetDISI::inPlaceOr ( const DocIdSetIteratorPtr disi)

Perform an in-place OR with the doc ids from a given DocIdSetIterator, setting the bit for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.

◆ inPlaceXor()

void Lucene::OpenBitSetDISI::inPlaceXor ( const DocIdSetIteratorPtr disi)

Perform an inplace XOR with the doc ids from a given DocIdSetIterator, flipping all the bits for each such doc id. These doc ids should be smaller than the maximum size passed to the constructor.

◆ shared_from_this()

boost::shared_ptr< OpenBitSetDISI > Lucene::OpenBitSetDISI::shared_from_this ( )
inline

The documentation for this class was generated from the following file:

clucene.sourceforge.net