/** * 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. */ public void InPlaceNot(DocIdSetIterator disi) { while (disi.Next() && (disi.Doc() < Size())) { FastClear(disi.Doc()); } }
/** * 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. */ public void InPlaceOr(DocIdSetIterator disi) { while (disi.Next() && (disi.Doc() < Size())) { FastSet(disi.Doc()); } }
/** * Create a SortedVIntList. * @param 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. */ public SortedVIntList(DocIdSetIterator docIdSetIterator) { SortedVIntListBuilder builder = new SortedVIntListBuilder(this); while (docIdSetIterator.Next()) { builder.AddInt(docIdSetIterator.Doc()); } builder.Done(); }
/** * 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 void InPlaceXor(DocIdSetIterator disi) { while (disi.Next() && (disi.Doc() < Size())) { FastFlip(disi.Doc()); } }