public class DescriptionLength extends Object
BigInteger
. See
HasDescriptionLength
for more information on the importance of description lengths in the context of
LEIA.Modifier and Type | Method and Description |
---|---|
static long |
descriptionLength(BigInteger n)
Returns the length of the bit-sequence that is represented by the prefix-free encoding of the given number.
|
static BigInteger |
prefixDecode(Reader reader) |
static String |
prefixEncode(BigInteger n)
Returns an ascii form of the prefix-free encoding of the given number.
|
static String |
toBinary(BigInteger n)
Returns an ascii form of the binary representation of the given big integer.
|
public static String toBinary(BigInteger n)
n
- The number to representpublic static String prefixEncode(BigInteger n)
n
- The number to representpublic static BigInteger prefixDecode(Reader reader)
public static long descriptionLength(BigInteger n)
n
- The number to evaluateCopyright © 2013. All Rights Reserved.