# Uses of Class
org.apache.lucene.util.BitSet

Packages that use BitSet
Package
Description
org.apache.lucene.util
Some utility classes.
org.apache.lucene.util.hnsw
Navigable Small-World graph, nominally Hierarchical but currently only has a single layer.

- ## Uses of BitSet in org.apache.lucene.util

  Subclasses of BitSet in org.apache.lucene.util
  Modifier and Type
  Class
  Description
  `final class`
  `FixedBitSet`
  BitSet of fixed length (numBits), backed by accessible (`FixedBitSet.getBits()`) long[], accessed with an int index, implementing `Bits` and `DocIdSet`.
  `class`
  `SparseFixedBitSet`
  A bit set that only stores longs that have at least one bit which is set.
  Methods in org.apache.lucene.util that return BitSet
  Modifier and Type
  Method
  Description
  `BitSet`
  BitDocIdSet.`bits()`
  Deprecated.
  `BitSet`
  BitSetIterator.`getBitSet()`
  Return the wrapped `BitSet`.
  `static BitSet`
  BitSet.`of(DocIdSetIterator it, int maxDoc)`
  Build a `BitSet` from the content of the provided `DocIdSetIterator`.
  Constructors in org.apache.lucene.util with parameters of type BitSet
  Modifier
  Constructor
  Description
  ``
  `BitDocIdSet(BitSet set)`
  Same as `BitDocIdSet(BitSet, long)` but uses the set's `approximate cardinality` as a cost.
  ``
  `BitDocIdSet(BitSet set, long cost)`
  Wrap the given `BitSet` as a `DocIdSet`.
  ``
  `BitSetIterator(BitSet bits, long cost)`
  Sole constructor.

- ## Uses of BitSet in org.apache.lucene.util.hnsw

  Fields in org.apache.lucene.util.hnsw declared as BitSet
  Modifier and Type
  Field
  Description
  `protected BitSet`
  HnswGraphSearcher.`visited`
  Methods in org.apache.lucene.util.hnsw with parameters of type BitSet
  Modifier and Type
  Method
  Description
  `static InitializedHnswGraphBuilder`
  InitializedHnswGraphBuilder.`fromGraph(RandomVectorScorerSupplier scorerSupplier, int M, int beamWidth, long seed, HnswGraph initializerGraph, int[] newOrdMap, BitSet initializedNodes, int totalNumberOfVectors)`
  Create a new HnswGraphBuilder that is initialized with the provided HnswGraph.
  `static MergingHnswGraphBuilder`
  MergingHnswGraphBuilder.`fromGraphs(RandomVectorScorerSupplier scorerSupplier, int M, int beamWidth, long seed, HnswGraph[] graphs, int[][] ordMaps, int totalNumberOfVectors, BitSet initializedNodes)`
  Create a new HnswGraphBuilder that is initialized with the provided HnswGraph.
  `protected final int[][]`
  IncrementalHnswGraphMerger.`getNewOrdMapping(KnnVectorValues mergedVectorValues, BitSet initializedNodes)`
  Constructors in org.apache.lucene.util.hnsw with parameters of type BitSet
  Modifier
  Constructor
  Description
  ``
  `HnswConcurrentMergeBuilder(TaskExecutor taskExecutor, int numWorker, RandomVectorScorerSupplier scorerSupplier, int M, int beamWidth, OnHeapHnswGraph hnsw, BitSet initializedNodes)`
  ``
  `HnswGraphSearcher(NeighborQueue candidates, BitSet visited)`
  Creates a new graph searcher.
  ``
  `InitializedHnswGraphBuilder(RandomVectorScorerSupplier scorerSupplier, int M, int beamWidth, long seed, OnHeapHnswGraph initializedGraph, BitSet initializedNodes)`