congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HuffmanCodec$DecoderInputs.getShortestCodeWord
Code IndexAdd Tabnine to your IDE (free)

How to use
getShortestCodeWord
method
in
it.unimi.dsi.compression.HuffmanCodec$DecoderInputs

Best Java code snippets using it.unimi.dsi.compression.HuffmanCodec$DecoderInputs.getShortestCodeWord (Showing top 10 results out of 315)

origin: blazegraph/database

obs.write(decoderInputs.getShortestCodeWord().iterator());
      + decoderInputs.getShortestCodeWord()+"\n");
origin: com.blazegraph/bigdata-core

obs.write(decoderInputs.getShortestCodeWord().iterator());
      + decoderInputs.getShortestCodeWord()+"\n");
origin: blazegraph/database

.getShortestCodeWord(), actualInputs.getShortestCodeWord());
origin: com.blazegraph/bigdata-core-test

.getShortestCodeWord(), actualInputs.getShortestCodeWord());
origin: com.blazegraph/bigdata-core-test

/**
 * Unit test for processing an {@link IRaba} representing B+Tree keys
 * suitable to setup the data for compression.
 * 
 * @throws IOException 
 */
public void test_keyRabaSetup() throws IOException {
  final int n = 8;
  final byte[][] a = new byte[n][];
  a[0] = new byte[]{1,2};
  a[1] = new byte[]{1,2,3};
  a[2] = new byte[]{1,3};
  a[3] = new byte[]{1,3,1};
  a[4] = new byte[]{1,3,3};
  a[5] = new byte[]{1,3,7};
  a[6] = new byte[]{1,5};
  a[7] = new byte[]{1,6,0};
  
  final IRaba raba = new ReadOnlyKeysRaba(a);
  final AbstractCodingSetup setup = new RabaCodingSetup(raba);
  doDecoderInputRoundTripTest(setup.getSymbolCount(), setup
      .decoderInputs());
  // verify that we can re-create the coder.
  doCoderRoundTripTest(setup.codec().codeWords(), setup.decoderInputs()
      .getShortestCodeWord(), setup.decoderInputs().getLengths(),
      setup.decoderInputs().getSymbols());
}
origin: blazegraph/database

/**
 * Unit test for processing an {@link IRaba} representing B+Tree keys
 * suitable to setup the data for compression.
 * 
 * @throws IOException 
 */
public void test_keyRabaSetup() throws IOException {
  final int n = 8;
  final byte[][] a = new byte[n][];
  a[0] = new byte[]{1,2};
  a[1] = new byte[]{1,2,3};
  a[2] = new byte[]{1,3};
  a[3] = new byte[]{1,3,1};
  a[4] = new byte[]{1,3,3};
  a[5] = new byte[]{1,3,7};
  a[6] = new byte[]{1,5};
  a[7] = new byte[]{1,6,0};
  
  final IRaba raba = new ReadOnlyKeysRaba(a);
  final AbstractCodingSetup setup = new RabaCodingSetup(raba);
  doDecoderInputRoundTripTest(setup.getSymbolCount(), setup
      .decoderInputs());
  // verify that we can re-create the coder.
  doCoderRoundTripTest(setup.codec().codeWords(), setup.decoderInputs()
      .getShortestCodeWord(), setup.decoderInputs().getLengths(),
      setup.decoderInputs().getSymbols());
}
origin: com.blazegraph/bigdata-core-test

/**
 * Unit test for processing an {@link IRaba} representing B+Tree values
 * suitable to setup the data for compression.
 * 
 * @throws IOException 
 * 
 * @todo test w/ nulls.
 */
public void test_valueRabaSetup() throws IOException {
  final int n = 3;
  final byte[][] a = new byte[n][];
  a[0] = new byte[]{2,3};
  a[1] = new byte[]{3,5};
  a[2] = new byte[]{'m','i','k','e'};
  
  final IRaba raba = new ReadOnlyValuesRaba(a);
  final RabaCodingSetup setup = new RabaCodingSetup(raba);
  
  // verify that we can re-create the decoder.
  doDecoderInputRoundTripTest(setup.getSymbolCount(), setup
      .decoderInputs());
  // verify that we can re-create the coder.
  doCoderRoundTripTest(setup.codec().codeWords(), setup.decoderInputs()
      .getShortestCodeWord(), setup.decoderInputs().getLengths(),
      setup.decoderInputs().getSymbols());
}
origin: blazegraph/database

/**
 * Unit test for processing an {@link IRaba} representing B+Tree values
 * suitable to setup the data for compression.
 * 
 * @throws IOException 
 * 
 * @todo test w/ nulls.
 */
public void test_valueRabaSetup() throws IOException {
  final int n = 3;
  final byte[][] a = new byte[n][];
  a[0] = new byte[]{2,3};
  a[1] = new byte[]{3,5};
  a[2] = new byte[]{'m','i','k','e'};
  
  final IRaba raba = new ReadOnlyValuesRaba(a);
  final RabaCodingSetup setup = new RabaCodingSetup(raba);
  
  // verify that we can re-create the decoder.
  doDecoderInputRoundTripTest(setup.getSymbolCount(), setup
      .decoderInputs());
  // verify that we can re-create the coder.
  doCoderRoundTripTest(setup.codec().codeWords(), setup.decoderInputs()
      .getShortestCodeWord(), setup.decoderInputs().getLengths(),
      setup.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());
}
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());
}
it.unimi.dsi.compressionHuffmanCodec$DecoderInputsgetShortestCodeWord

Javadoc

The shortest code word. Note that canonical huffman codes can be recreated from just length[0] and the shortest code word.

Popular methods of HuffmanCodec$DecoderInputs

  • <init>
    Ctor may be used to explicitly populate an instance with the caller's data.
  • getLengths
    Return the codeWord bit lengths in the non-decreasing order used to construct the CanonicalFast64Cod
  • getSymbols
    Return the symbol[] in the permuted order used to construct the CanonicalFast64CodeWordDecoder. This

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Runner (org.openjdk.jmh.runner)
  • Top Vim plugins
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