org.apache.lucene.util
Class OpenBitSetDISI

java.lang.Object
  extended by org.apache.lucene.search.DocIdSet
      extended by org.apache.lucene.util.OpenBitSet
          extended by org.apache.lucene.util.OpenBitSetDISI
All Implemented Interfaces:
Serializable, Cloneable

public class OpenBitSetDISI
extends OpenBitSet

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.lucene.util.OpenBitSet
bits, wlen
 
Fields inherited from class org.apache.lucene.search.DocIdSet
EMPTY_DOCIDSET
 
Constructor Summary
OpenBitSetDISI(DocIdSetIterator disi, int maxSize)
          Construct an OpenBitSetDISI with its bits set from the doc ids of the given DocIdSetIterator.
OpenBitSetDISI(int 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.
 
Method Summary
 void inPlaceAnd(DocIdSetIterator disi)
          Perform an inplace AND with the doc ids from a given DocIdSetIterator, leaving only the bits set for which the doc ids are in common.
 void inPlaceNot(DocIdSetIterator disi)
          Perform an inplace NOT with the doc ids from a given DocIdSetIterator, clearing all the bits for each such doc id.
 void inPlaceOr(DocIdSetIterator disi)
          Perform an inplace OR with the doc ids from a given DocIdSetIterator, setting the bit for each such doc id.
 void inPlaceXor(DocIdSetIterator disi)
          Perform an inplace XOR with the doc ids from a given DocIdSetIterator, flipping all the bits for each such doc id.
 
Methods inherited from class org.apache.lucene.util.OpenBitSet
and, andNot, andNotCount, bits2words, capacity, cardinality, clear, clear, clear, clone, ensureCapacity, ensureCapacityWords, equals, expandingWordNum, fastClear, fastClear, fastFlip, fastFlip, fastGet, fastGet, fastSet, fastSet, flip, flip, flipAndGet, flipAndGet, get, get, getAndSet, getAndSet, getBit, getBits, getNumWords, hashCode, intersect, intersectionCount, intersects, isCacheable, isEmpty, iterator, nextSetBit, nextSetBit, or, remove, set, set, setBits, setNumWords, size, trimTrailingZeros, union, unionCount, xor, xorCount
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenBitSetDISI

public OpenBitSetDISI(DocIdSetIterator disi,
                      int maxSize)
               throws IOException
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.

Throws:
IOException

OpenBitSetDISI

public OpenBitSetDISI(int 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.

Method Detail

inPlaceOr

public void inPlaceOr(DocIdSetIterator disi)
               throws IOException
Perform an inplace 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.

Throws:
IOException

inPlaceAnd

public void inPlaceAnd(DocIdSetIterator disi)
                throws IOException
Perform an inplace 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.

Throws:
IOException

inPlaceNot

public void inPlaceNot(DocIdSetIterator disi)
                throws IOException
Perform an inplace 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.

Throws:
IOException

inPlaceXor

public void inPlaceXor(DocIdSetIterator disi)
                throws IOException
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.

Throws:
IOException


Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.