Package it.unimi.dsi.io

Examples of it.unimi.dsi.io.OutputBitStream.writeGamma()


          }
        }
      }
           
      totalFrequency = combine( numUsedIndices );
      frequencies.writeGamma( totalFrequency );
      numPointers += totalFrequency;

      /* A trick to get a correct prediction. */
      if ( writeGlobCounts ) pl.count += totalGlobCount - 1;
      pl.update();
View Full Code Here


          break;
        case SHIFTED_GAMMA:
          bitCount = out.writeShiftedGamma( pointer - lastDocument - 1 );
          break;
        case GAMMA:
          bitCount = out.writeGamma( pointer - lastDocument - 1 );
          break;
        case DELTA:
          bitCount = out.writeDelta( pointer - lastDocument - 1 );
          break;
        case GOLOMB:
View Full Code Here

    final int end = offset + len;
    final OutputBitStream positions = this.positions;
   
    switch( positionCoding ) {
      case GAMMA:
        if ( COOKIES ) bitCount += positions.writeGamma( Integer.MAX_VALUE );
        for( i = offset; i < end; i++ ) {
          bitCount += positions.writeGamma( occ[ i ] - prev - 1 );
          prev = occ[ i ];
        }
        break;
View Full Code Here

   
    switch( positionCoding ) {
      case GAMMA:
        if ( COOKIES ) bitCount += positions.writeGamma( Integer.MAX_VALUE );
        for( i = offset; i < end; i++ ) {
          bitCount += positions.writeGamma( occ[ i ] - prev - 1 );
          prev = occ[ i ];
        }
        break;
      case DELTA:
        if ( COOKIES bitCount += positions.writeDelta( Integer.MAX_VALUE );
View Full Code Here


          final OutputBitStream permutedSizes = new OutputBitStream( batchBasename( batch, basename, batchDir ) + DiskBasedIndex.SIZES_EXTENSION );
          for ( int i = 0, d = 0; i < documentCount; i++ ) {
            while ( d++ < document[ i ] )
              permutedSizes.writeGamma( 0 );
            permutedSizes.writeGamma( size[ i ] );
          }
          permutedSizes.close();
        }
      }
View Full Code Here

          final OutputBitStream permutedSizes = new OutputBitStream( batchBasename( batch, basename, batchDir ) + DiskBasedIndex.SIZES_EXTENSION );
          for ( int i = 0, d = 0; i < documentCount; i++ ) {
            while ( d++ < document[ i ] )
              permutedSizes.writeGamma( 0 );
            permutedSizes.writeGamma( size[ i ] );
          }
          permutedSizes.close();
        }
      }
     
View Full Code Here

        }
      }
     
      if ( indexingIsVirtual ) {
        final OutputBitStream sizes = new OutputBitStream( batchBasename( batch, basename, batchDir ) + DiskBasedIndex.SIZES_EXTENSION );
        for ( int i = 0; i < currSize.length; i++ ) sizes.writeGamma( currSize[ i ] );
        sizes.close();
      }

      globCounts.close();
      frequencies.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.