Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Label ¶
Label generates unique prefix-free labels for a set of items given their frequencies. Prefix-free labels guarantee that none of the generated labels is a prefix for another.
For each item i, freqs[i] specifies its frequency. Items with higher frequencies will get shorter labels.
Labels are generated using an alphabet of the provided size. For each item i, labels[i] is a list of indexes in the alphabet that comprise that item's label. For example, given a binary alphabet {a b}, the label {0 1 0} means "aba".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.