Tabnine Logo
HuffmanCodec.newCoder
Code IndexAdd Tabnine to your IDE (free)

How to use
newCoder
method
in
it.unimi.dsi.compression.HuffmanCodec

Best Java code snippets using it.unimi.dsi.compression.HuffmanCodec.newCoder (Showing top 4 results out of 315)

origin: blazegraph/database

/**
 * @param shortestCodeWord
 * @param lengths
 * @param
 */
private void doCoderRoundTripTest(final BitVector[] expected,
    final BitVector shortestCodeWord, final int[] length,
    final int[] symbol) {
  final PrefixCoder newCoder = HuffmanCodec.newCoder(shortestCodeWord,
      length, symbol);
  final BitVector[] actual = newCoder.codeWords();
  assertEquals("codeWord[]", expected, actual);
  if (log.isDebugEnabled()) {
       log.debug("\nexpected: " + Arrays.toString(expected)
        + "\nactual  : " + Arrays.toString(actual));
    
  }
  
}
 
origin: com.blazegraph/bigdata-core-test

/**
 * @param shortestCodeWord
 * @param lengths
 * @param
 */
private void doCoderRoundTripTest(final BitVector[] expected,
    final BitVector shortestCodeWord, final int[] length,
    final int[] symbol) {
  final PrefixCoder newCoder = HuffmanCodec.newCoder(shortestCodeWord,
      length, symbol);
  final BitVector[] actual = newCoder.codeWords();
  assertEquals("codeWord[]", expected, actual);
  if (log.isDebugEnabled()) {
       log.debug("\nexpected: " + Arrays.toString(expected)
        + "\nactual  : " + Arrays.toString(actual));
    
  }
  
}
 
origin: blazegraph/database

/**
 * (Re-)constructs the canonical huffman code from the shortest code word,
 * the non-decreasing bit lengths of each code word, and the permutation of
 * the symbols corresponding to those bit lengths. This information is
 * necessary and sufficient to reconstruct a canonical huffman code.
 * 
 * @param decoderInputs
 *            This contains the necessary and sufficient information to
 *            recreate the {@link PrefixCoder}.
 * 
 * @return A new {@link PrefixCoder} instance for the corresponding
 *         canonical huffman code.
 */
static public PrefixCoder newCoder(final DecoderInputs decoderInputs) {
  return newCoder(decoderInputs.getShortestCodeWord(), decoderInputs
      .getLengths(), decoderInputs.getSymbols());
}
origin: com.blazegraph/dsi-utils

/**
 * (Re-)constructs the canonical huffman code from the shortest code word,
 * the non-decreasing bit lengths of each code word, and the permutation of
 * the symbols corresponding to those bit lengths. This information is
 * necessary and sufficient to reconstruct a canonical huffman code.
 * 
 * @param decoderInputs
 *            This contains the necessary and sufficient information to
 *            recreate the {@link PrefixCoder}.
 * 
 * @return A new {@link PrefixCoder} instance for the corresponding
 *         canonical huffman code.
 */
static public PrefixCoder newCoder(final DecoderInputs decoderInputs) {
  return newCoder(decoderInputs.getShortestCodeWord(), decoderInputs
      .getLengths(), decoderInputs.getSymbols());
}
it.unimi.dsi.compressionHuffmanCodecnewCoder

Javadoc

(Re-)constructs the canonical huffman code from the shortest code word, the non-decreasing bit lengths of each code word, and the permutation of the symbols corresponding to those bit lengths. This information is necessary and sufficient to reconstruct a canonical huffman code.

Popular methods of HuffmanCodec

  • <init>
    Creates a new Huffman codec using the given vector of frequencies.
  • codeWords
  • coder
  • decoder
  • intArray2LongArray

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getContentResolver (Context)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now