Examples of readDelta()


Examples of it.unimi.dsi.io.InputBitStream.readDelta()

          int currPointer;
          for ( int j = 0; j < frequency; j++ ) {
            ibs.position( bitPos[ j ] );
            obs = indexWriter.newDocumentRecord();
            indexWriter.writeDocumentPointer( obs, currPointer = ibs.readDelta() );
            if ( ASSERTS ) assert currPointer == pointer[ j ];
            if ( hasCounts ) count = ibs.readGamma() + 1;
            if ( hasPositions ) {
              ibs.readDeltas( pos, count );
              for ( int p = 1; p < count; p++ ) pos[ p ] += pos[ p - 1 ] + 1;
View Full Code Here

Examples of it.unimi.dsi.io.InputBitStream.readDelta()

            }

            if ( indexingIsVirtual ) {
              while( j < frequency - 1 ) {
                ibs.position( bitPos[ j + 1 ] );
                if ( currPointer != ibs.readDelta() ) break;
                j++;
                if ( hasCounts ) moreCount = ibs.readGamma() + 1;
                if ( hasPositions ) {
                  pos = IntArrays.grow( pos, count + moreCount, count );
                  pos[ count ] = ibs.readDelta();
View Full Code Here

Examples of it.unimi.dsi.io.InputBitStream.readDelta()

                if ( currPointer != ibs.readDelta() ) break;
                j++;
                if ( hasCounts ) moreCount = ibs.readGamma() + 1;
                if ( hasPositions ) {
                  pos = IntArrays.grow( pos, count + moreCount, count );
                  pos[ count ] = ibs.readDelta();
                  if ( ASSERTS ) assert pos[ count ] > pos[ count - 1 ];
                  for ( int p = 1; p < moreCount; p++ ) pos[ count + p ] = pos[ count + p - 1 ] + 1 + ibs.readDelta();
                }
                count += moreCount;
              }
View Full Code Here

Examples of it.unimi.dsi.io.InputBitStream.readDelta()

                if ( hasCounts ) moreCount = ibs.readGamma() + 1;
                if ( hasPositions ) {
                  pos = IntArrays.grow( pos, count + moreCount, count );
                  pos[ count ] = ibs.readDelta();
                  if ( ASSERTS ) assert pos[ count ] > pos[ count - 1 ];
                  for ( int p = 1; p < moreCount; p++ ) pos[ count + p ] = pos[ count + p - 1 ] + 1 + ibs.readDelta();
                }
                count += moreCount;
              }
              if ( maxCount < count ) maxCount = count;
            }
View Full Code Here

Examples of it.unimi.dsi.io.InputBitStream.readDelta()

   */
  public void stripPointers( final OutputBitStream obs, final long bitLength ) throws IOException {
    final InputBitStream ibs = new InputBitStream( buffer );
    int count;
    while( ibs.readBits() < bitLength ) {
      ibs.readDelta(); // Discard pointer
      if ( completeness >= COUNTS.ordinal() ) {
        count = ibs.readGamma() + 1;
        obs.writeGamma( count - 1 );
        if ( completeness >= POSITIONS.ordinal() ) while( count-- != 0 ) obs.writeDelta( ibs.readDelta() );
      }
View Full Code Here

Examples of it.unimi.dsi.io.InputBitStream.readDelta()

    documentsIbs.position( 0 );
    for( int i = (int)collection.documents; i-- != 0; ) {
      readSelfDelimitedUtf8String( documentsIbs, s ); // Skip URI
      readSelfDelimitedUtf8String( documentsIbs, s ); // Skip title
      for( int f = factory.numberOfFields() - 1; f-- !=0; ) {
        int len = documentsIbs.readDelta();
        while( len-- != 0 ) {
          termFrequency[ documentsIbs.readDelta() ]++;
          if ( exact ) nonTermFrequency[ documentsIbs.readDelta() ]++;
        }
      }
View Full Code Here

Examples of it.unimi.dsi.io.InputBitStream.readDelta()

      readSelfDelimitedUtf8String( documentsIbs, s ); // Skip URI
      readSelfDelimitedUtf8String( documentsIbs, s ); // Skip title
      for( int f = factory.numberOfFields() - 1; f-- !=0; ) {
        int len = documentsIbs.readDelta();
        while( len-- != 0 ) {
          termFrequency[ documentsIbs.readDelta() ]++;
          if ( exact ) nonTermFrequency[ documentsIbs.readDelta() ]++;
        }
      }
    }
   
View Full Code Here

Examples of it.unimi.dsi.io.InputBitStream.readDelta()

      readSelfDelimitedUtf8String( documentsIbs, s ); // Skip title
      for( int f = factory.numberOfFields() - 1; f-- !=0; ) {
        int len = documentsIbs.readDelta();
        while( len-- != 0 ) {
          termFrequency[ documentsIbs.readDelta() ]++;
          if ( exact ) nonTermFrequency[ documentsIbs.readDelta() ]++;
        }
      }
    }
   
    int[] termPerm = new int[ termFrequency.length ];
View Full Code Here

Examples of it.unimi.dsi.io.InputBitStream.readDelta()

      readSelfDelimitedUtf8String( documentsIbs, s ); // Skip URI
      SimpleCompressedDocumentCollectionBuilder.writeSelfDelimitedUtf8String( newDocumentsObs, s );
      readSelfDelimitedUtf8String( documentsIbs, s ); // Skip title
      SimpleCompressedDocumentCollectionBuilder.writeSelfDelimitedUtf8String( newDocumentsObs, s );
      for( int f = factory.numberOfFields() - 1; f-- !=0; ) {
        int len = documentsIbs.readDelta();
        newDocumentsObs.writeDelta( len );
        while( len-- != 0 ) {
          newDocumentsObs.writeDelta( invTermPerm[ documentsIbs.readDelta() ] );
          if ( exact ) newDocumentsObs.writeDelta( invNonTermPerm[ documentsIbs.readDelta() ] );
        }
View Full Code Here

Examples of it.unimi.dsi.io.InputBitStream.readDelta()

      SimpleCompressedDocumentCollectionBuilder.writeSelfDelimitedUtf8String( newDocumentsObs, s );
      for( int f = factory.numberOfFields() - 1; f-- !=0; ) {
        int len = documentsIbs.readDelta();
        newDocumentsObs.writeDelta( len );
        while( len-- != 0 ) {
          newDocumentsObs.writeDelta( invTermPerm[ documentsIbs.readDelta() ] );
          if ( exact ) newDocumentsObs.writeDelta( invNonTermPerm[ documentsIbs.readDelta() ] );
        }
      }
    }
    newDocumentsObs.close();
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.