Package it.unimi.dsi.sux4j.mph.codec
Class Codec.Unary
java.lang.Object
it.unimi.dsi.sux4j.mph.codec.Codec.Unary
- All Implemented Interfaces:
Codec
- Enclosing interface:
Codec
A unary codec (starting at zero).
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface it.unimi.dsi.sux4j.mph.codec.Codec
Codec.Binary, Codec.Decoder, Codec.Gamma, Codec.Huffman, Codec.Unary, Codec.ZeroCodec -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCoder(it.unimi.dsi.fastutil.longs.Long2LongMap frequencies) Returns a coder for a specific map from symbols to frequencies.
-
Constructor Details
-
Unary
public Unary()
-
-
Method Details
-
getCoder
Description copied from interface:CodecReturns a coder for a specific map from symbols to frequencies.Note that even instantaneous codes (such as
Codec.Unary) need to know the set of symbols, as the returned coder needs to known the maximum codeword length.
-