Package edu.berkeley.nlp.lm.values
Interface CompressibleValueContainer<V>
- All Superinterfaces:
Serializable,ValueContainer<V>
- All Known Implementing Classes:
CompressibleProbBackoffValueContainer,CountValueContainer,UncompressedProbBackoffValueContainer
-
Method Summary
Modifier and TypeMethodDescriptionvoidclearStorageAfterCompression(int ngramOrder) voiddecompress(BitStream bits, int ngramOrder, boolean justConsume, V outputVal) Reads and decompresses from the bit stream bits.getCompressed(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 Details
-
swap
void swap(long a, long b, int ngramOrder) Swaps values at offsets a and b.- Parameters:
a-b-ngramOrder-
-
getCompressed
Compresses the value at the given offset into a list of bits.- Parameters:
offset-ngramOrder-- Returns:
-
decompress
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)
-