Examples of BitVector


Examples of org.apache.lucene.util.BitVector

    tis = new TermInfosReader(cfsDir, segment, fieldInfos);

    // NOTE: the bitvector is stored using the regular directory, not cfs
    if (hasDeletions(si))
      deletedDocs = new BitVector(directory(), segment + ".del");

    // make sure that all index files have been read or are kept open
    // so that if an index update removes them we'll still have them
    freqStream = cfsDir.openFile(segment + ".frq");
    proxStream = cfsDir.openFile(segment + ".prx");
View Full Code Here

Examples of org.apache.lucene.util.BitVector

    return si.dir.fileExists(si.name + ".cfs");
  }

  protected final synchronized void doDelete(int docNum) throws IOException {
    if (deletedDocs == null)
      deletedDocs = new BitVector(maxDoc());
    deletedDocsDirty = true;
    deletedDocs.set(docNum);
  }
View Full Code Here

Examples of org.apache.lucene.util.BitVector

  }

  private void loadDeletedDocs() throws IOException {
    // NOTE: the bitvector is stored using the regular directory, not cfs
    if (hasDeletions(si)) {
      deletedDocs = new BitVector(directory(), si.getDelFileName());
      deletedDocsRef = new Ref();
      assert checkDeletedCounts();
    } else
      assert si.getDelCount() == 0;
  }
View Full Code Here

Examples of org.apache.lucene.util.BitVector

  }

  @Override
  protected void doDelete(int docNum) {
    if (deletedDocs == null) {
      deletedDocs = new BitVector(maxDoc());
      deletedDocsRef = new Ref();
    }
    // there is more than 1 SegmentReader with a reference to this
    // deletedDocs BitVector so decRef the current deletedDocsRef,
    // clone the BitVector, create a new deletedDocsRef
View Full Code Here

Examples of plan_runner.storage.BitVector

    final int[] hash = new int[discardingTaggedRelationStorage.size()
        + discardingTupleStorage.size()];
    final int[] addresses = new int[discardingTaggedRelationStorage.size()
        + discardingTupleStorage.size()];

    final BitVector isTagged = new BitVector(discardingTaggedRelationStorage.size()
        + discardingTupleStorage.size());
    isTagged.set(0, discardingTaggedRelationStorage.size());

    TupleStorage.preProcess(discardingTaggedRelationStorage, discardingTupleStorage, hash,
        addresses);

    final int bounds[] = Discard.keep(hash, addresses, isTagged, discardingParts,
        discardingIndex);

    for (int i = bounds[0]; i <= bounds[1]; i++) {
      final int address = addresses[i];
      final boolean isTaggedTuple = isTagged.get(i);
      String tupleString = "";
      if (isTaggedTuple)
        tupleString = discardingTaggedRelationStorage.get(address);
      else
        tupleString = discardingTupleStorage.get(address);
View Full Code Here

Examples of uk.ac.ucl.panda.indexing.io.BitVector

        message("commitMerge " + merge.segString(directory));

      // Carefully merge deletes that occurred after we
      // started merging:

      BitVector deletes = null;
      int docUpto = 0;

      final int numSegmentsToMerge = sourceSegments.size();
      for(int i=0;i<numSegmentsToMerge;i++) {
        final SegmentInfo previousInfo = sourceSegmentsClone.info(i);
        final SegmentInfo currentInfo = sourceSegments.info(i);

        assert currentInfo.docCount == previousInfo.docCount;

        final int docCount = currentInfo.docCount;

        if (previousInfo.hasDeletions()) {

          // There were deletes on this segment when the merge
          // started.  The merge has collapsed away those
          // deletes, but, if new deletes were flushed since
          // the merge started, we must now carefully keep any
          // newly flushed deletes but mapping them to the new
          // docIDs.

          assert currentInfo.hasDeletions();

          // Load deletes present @ start of merge, for this segment:
          BitVector previousDeletes = new BitVector(previousInfo.dir, previousInfo.getDelFileName());

          if (!currentInfo.getDelFileName().equals(previousInfo.getDelFileName())) {
            // This means this segment has had new deletes
            // committed since we started the merge, so we
            // must merge them:
            if (deletes == null)
              deletes = new BitVector(merge.info.docCount);

            BitVector currentDeletes = new BitVector(currentInfo.dir, currentInfo.getDelFileName());
            for(int j=0;j<docCount;j++) {
              if (previousDeletes.get(j))
                assert currentDeletes.get(j);
              else {
                if (currentDeletes.get(j))
                  deletes.set(docUpto);
                docUpto++;
              }
            }
          } else
            docUpto += docCount - previousDeletes.count();
       
        } else if (currentInfo.hasDeletions()) {
          // This segment had no deletes before but now it
          // does:
          if (deletes == null)
            deletes = new BitVector(merge.info.docCount);
          BitVector currentDeletes = new BitVector(directory, currentInfo.getDelFileName());

          for(int j=0;j<docCount;j++) {
            if (currentDeletes.get(j))
              deletes.set(docUpto);
            docUpto++;
          }

        } else
View Full Code Here

Examples of umontreal.iro.lecuyer.util.BitVector

         well.nextValue();
         for(int j = 0; j < R; j++)
            vect[j] = well.state[(well.state_i + j) & MASK];

         bv[i] = new BitVector(vect, 512);
      }

      STp0 = (new BitMatrix(bv)).transpose();

      STpw = STp0.power2e(200);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.