edu.berkeley.nlp.lm.values
Interface CompressibleValueContainer<V>

All Superinterfaces:
Serializable, ValueContainer<V>
All Known Implementing Classes:
CompressibleProbBackoffValueContainer, CountValueContainer, UncompressedProbBackoffValueContainer

public interface CompressibleValueContainer<V>
extends ValueContainer<V>


Method Summary
 void clearStorageAfterCompression(int ngramOrder)
           
 void decompress(BitStream bits, int ngramOrder, boolean justConsume, V outputVal)
          Reads and decompresses from the bit stream bits.
 BitList getCompressed(long offset, int ngramOrder)
          Compresses the value at the given offset into a list of bits.
 void swap(long a, long b, int ngramOrder)
          Swaps values at offsets a and b.
 
Methods inherited from interface edu.berkeley.nlp.lm.values.ValueContainer
add, clearStorageForOrder, createFreshValues, getFromOffset, getScratchValue, numValueBits, setFromOtherValues, setMap, setSizeAtLeast, storeSuffixoffsets, trim, trimAfterNgram
 

Method Detail

swap

void swap(long a,
          long b,
          int ngramOrder)
Swaps values at offsets a and b.

Parameters:
a -
b -
ngramOrder -

getCompressed

BitList getCompressed(long offset,
                      int ngramOrder)
Compresses the value at the given offset into a list of bits.

Parameters:
offset -
ngramOrder -
Returns:

decompress

void decompress(BitStream bits,
                int ngramOrder,
                boolean justConsume,
                V outputVal)
Reads and decompresses from the bit stream bits.

Parameters:
bits -
ngramOrder -
justConsume - If true, nothing is returned, and the function simply consumes the appropriate number of bits from the BitStream.

clearStorageAfterCompression

void clearStorageAfterCompression(int ngramOrder)