it.unimi.dsi.mg4j.util
Class ImmutableExternalTreePrefixDictionary

java.lang.Object
  extended by it.unimi.dsi.fastutil.objects.AbstractObjectCollection<K>
      extended by it.unimi.dsi.fastutil.objects.AbstractObjectList<CharSequence>
          extended by it.unimi.dsi.mg4j.util.ImmutableExternalPrefixDictionary
              extended by it.unimi.dsi.mg4j.util.ImmutableExternalTreePrefixDictionary
All Implemented Interfaces:
ObjectCollection<CharSequence>, ObjectIterable<CharSequence>, ObjectList<CharSequence>, Stack<CharSequence>, PrefixMap, TermMap, Serializable, Comparable<List<? extends CharSequence>>, Iterable<CharSequence>, Collection<CharSequence>, List<CharSequence>

Deprecated. Moved to dsiutils.

@Deprecated
public class ImmutableExternalTreePrefixDictionary
extends ImmutableExternalPrefixDictionary
implements Serializable

An ImmutableExternalPrefixDictionary that compresses words using a HuffmanCodec and approximates intervals using a TernaryIntervalSearchTree.

Since:
0.9.3
Author:
Sebastiano Vigna
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class it.unimi.dsi.mg4j.util.ImmutableExternalPrefixDictionary
ImmutableExternalPrefixDictionary.IntervalApproximator
 
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectList
AbstractObjectList.ObjectSubList<K>
 
Field Summary
static long serialVersionUID
          Deprecated.  
 
Fields inherited from class it.unimi.dsi.mg4j.util.ImmutableExternalPrefixDictionary
blockSize, char2symbol, decoder, intervalApproximator, size, STD_BLOCK_SIZE, symbol2char
 
Constructor Summary
ImmutableExternalTreePrefixDictionary(Iterable<? extends CharSequence> terms)
          Deprecated.  
ImmutableExternalTreePrefixDictionary(Iterable<? extends CharSequence> terms, CharSequence dumpFile)
          Deprecated.  
ImmutableExternalTreePrefixDictionary(Iterable<? extends CharSequence> terms, int blockSizeInBytes)
          Deprecated.  
ImmutableExternalTreePrefixDictionary(Iterable<? extends CharSequence> terms, int blockSizeInBytes, CharSequence dumpStreamFilename)
          Deprecated.  
 
Method Summary
protected  ImmutableExternalPrefixDictionary.IntervalApproximator getIntervalApproximator(List<? extends CharSequence> delimiters, PrefixCoder prefixCoder)
          Deprecated. An abstract factory method returning an interval approximator for this external dictionary.
protected  PrefixCodec getPrefixCodec(int[] frequency)
          Deprecated. An abstract factory method returning a prefix codec that will be used to compress the dump file.
 
Methods inherited from class it.unimi.dsi.mg4j.util.ImmutableExternalPrefixDictionary
contains, get, getIndex, getInterval, getNumber, getPrefix, getPrefix, getTerm, getTerm, hasPrefixes, hasTerms, indexOf, iterator, lastIndexOf, main, setDumpStream, setDumpStream, size
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectList
add, add, addAll, addAll, addElements, addElements, compareTo, contains, ensureIndex, ensureRestrictedIndex, equals, getElements, hashCode, listIterator, listIterator, objectListIterator, objectListIterator, objectSubList, peek, pop, push, remove, removeElements, set, size, subList, top, toString
 
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectCollection
clear, containsAll, isEmpty, objectIterator, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
clear, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectCollection
objectIterator, toArray
 
Methods inherited from interface it.unimi.dsi.fastutil.Stack
isEmpty
 

Field Detail

serialVersionUID

public static final long serialVersionUID
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

ImmutableExternalTreePrefixDictionary

public ImmutableExternalTreePrefixDictionary(Iterable<? extends CharSequence> terms)
                                      throws IOException
Deprecated. 
Throws:
IOException

ImmutableExternalTreePrefixDictionary

public ImmutableExternalTreePrefixDictionary(Iterable<? extends CharSequence> terms,
                                             CharSequence dumpFile)
                                      throws IOException
Deprecated. 
Throws:
IOException

ImmutableExternalTreePrefixDictionary

public ImmutableExternalTreePrefixDictionary(Iterable<? extends CharSequence> terms,
                                             int blockSizeInBytes)
                                      throws IOException
Deprecated. 
Throws:
IOException

ImmutableExternalTreePrefixDictionary

public ImmutableExternalTreePrefixDictionary(Iterable<? extends CharSequence> terms,
                                             int blockSizeInBytes,
                                             CharSequence dumpStreamFilename)
                                      throws IOException
Deprecated. 
Throws:
IOException
Method Detail

getPrefixCodec

protected PrefixCodec getPrefixCodec(int[] frequency)
Deprecated. 
Description copied from class: ImmutableExternalPrefixDictionary
An abstract factory method returning a prefix codec that will be used to compress the dump file.

Implementing subclasses must provide a codec. The coder will be used at construction time, and will be passed to ImmutableExternalPrefixDictionary.getIntervalApproximator(List, PrefixCoder), whereas the decoder will be available in ImmutableExternalPrefixDictionary.decoder.

Specified by:
getPrefixCodec in class ImmutableExternalPrefixDictionary
Parameters:
frequency - the symbol frequencies.
Returns:
the prefix codec that will be used to compress the dump file.

getIntervalApproximator

protected ImmutableExternalPrefixDictionary.IntervalApproximator getIntervalApproximator(List<? extends CharSequence> delimiters,
                                                                                         PrefixCoder prefixCoder)
Deprecated. 
Description copied from class: ImmutableExternalPrefixDictionary
An abstract factory method returning an interval approximator for this external dictionary.

Specified by:
getIntervalApproximator in class ImmutableExternalPrefixDictionary
Parameters:
delimiters - a list of the words appearing at the start of each block.
prefixCoder - the prefix coder provided by the prefix coded previously returned by ImmutableExternalPrefixDictionary.getPrefixCodec(int[]); the returned approximator can use its coder/decoder.
Returns:
an interval approximator for this external dictionary.