Package edu.berkeley.nlp.lm.values
Interface CompressibleValueContainer<V>
-
- All Superinterfaces:
java.io.Serializable,ValueContainer<V>
- All Known Implementing Classes:
CompressibleProbBackoffValueContainer,CountValueContainer,UncompressedProbBackoffValueContainer
public interface CompressibleValueContainer<V> extends ValueContainer<V>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearStorageAfterCompression(int ngramOrder)voiddecompress(BitStream bits, int ngramOrder, boolean justConsume, V outputVal)Reads and decompresses from the bit stream bits.BitListgetCompressed(long offset, int ngramOrder)Compresses the value at the given offset into a list of bits.voidswap(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)
-
-