Package it.unimi.dsi.bits
Class HuTuckerTransformationStrategy
- java.lang.Object
-
- it.unimi.dsi.bits.PrefixCoderTransformationStrategy
-
- it.unimi.dsi.bits.HuTuckerTransformationStrategy
-
- All Implemented Interfaces:
TransformationStrategy<java.lang.CharSequence>
,java.io.Serializable
public class HuTuckerTransformationStrategy extends PrefixCoderTransformationStrategy
A transformation strategy mapping strings to their Hu-Tucker encoding. The encoding is guaranteed to preserve lexicographical ordering.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class it.unimi.dsi.bits.PrefixCoderTransformationStrategy
char2symbol, codeWord, prefixFree
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HuTuckerTransformationStrategy(PrefixCoderTransformationStrategy huTuckerTransformationStrategy)
HuTuckerTransformationStrategy(java.lang.Iterable<? extends java.lang.CharSequence> iterable, boolean prefixFree)
Creates a Hu-Tucker transformation strategy for the character sequences returned by the given iterable.protected
HuTuckerTransformationStrategy(java.lang.Object[] a, boolean prefixFree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrefixCoderTransformationStrategy
copy()
Returns a copy of this transformation strategy.-
Methods inherited from class it.unimi.dsi.bits.PrefixCoderTransformationStrategy
length, numBits, toBitVector
-
-
-
-
Constructor Detail
-
HuTuckerTransformationStrategy
public HuTuckerTransformationStrategy(java.lang.Iterable<? extends java.lang.CharSequence> iterable, boolean prefixFree)
Creates a Hu-Tucker transformation strategy for the character sequences returned by the given iterable. The strategy will map a string to its Hu-Tucker encoding.- Parameters:
iterable
- an iterable object returning character sequences.prefixFree
- if true, the resulting set of binary words will be prefix free.
-
HuTuckerTransformationStrategy
protected HuTuckerTransformationStrategy(PrefixCoderTransformationStrategy huTuckerTransformationStrategy)
-
HuTuckerTransformationStrategy
protected HuTuckerTransformationStrategy(java.lang.Object[] a, boolean prefixFree)
-
-
Method Detail
-
copy
public PrefixCoderTransformationStrategy copy()
Description copied from interface:TransformationStrategy
Returns a copy of this transformation strategy.- Specified by:
copy
in interfaceTransformationStrategy<java.lang.CharSequence>
- Overrides:
copy
in classPrefixCoderTransformationStrategy
- Returns:
- a copy of this transformation strategy.
-
-