public class HammingCode<T extends Comparable<T>> extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
HammingCode.HammingCodeCollection |
| Modifier and Type | Field and Description |
|---|---|
protected TreeMap<Bits,T> |
forwardIndex |
protected HashMap<T,Bits> |
reverseIndex |
protected long |
totalWeight |
protected HashMap<T,Integer> |
weights |
| Constructor and Description |
|---|
HammingCode(Collection<HammingSymbol<T>> symbols) |
| Modifier and Type | Method and Description |
|---|---|
int |
codeSize() |
T |
decode(BitInputStream in) |
Map.Entry<Bits,T> |
decode(Bits data) |
Bits |
encode(T key) |
SortedMap<Bits,T> |
getCodes(Bits fromKey) |
CountTreeBitsCollection |
getSetEncoder() |
CountTreeBitsCollection |
getSetEncoder(BitInputStream data) |
CountTreeBitsCollection |
getSetEncoder(byte[] data) |
Map<T,Integer> |
getWeights() |
static boolean |
isPrefixFreeCode(Set<Bits> keySet) |
int |
totalWeight() |
boolean |
verifyIndexes() |
protected final TreeMap<Bits,T extends Comparable<T>> forwardIndex
protected final HashMap<T extends Comparable<T>,Bits> reverseIndex
protected final HashMap<T extends Comparable<T>,Integer> weights
protected final long totalWeight
public HammingCode(Collection<HammingSymbol<T>> symbols)
public int codeSize()
public T decode(BitInputStream in) throws IOException
IOExceptionpublic CountTreeBitsCollection getSetEncoder()
public CountTreeBitsCollection getSetEncoder(BitInputStream data) throws IOException
IOExceptionpublic CountTreeBitsCollection getSetEncoder(byte[] data) throws IOException
IOExceptionpublic boolean verifyIndexes()
public int totalWeight()
Copyright © 2019 SimiaCryptus Software. All rights reserved.