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

How to use
it.unimi.dsi.compression.HuffmanCodec$DecoderInputs
constructor

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

origin: com.blazegraph/bigdata-core

return new DecoderInputs(shortestCodeWord, length, symbol);
origin: blazegraph/database

return new DecoderInputs(shortestCodeWord, length, symbol);
origin: blazegraph/database

/**
 * This verifies that a code book constructed from a given set of
 * frequencies may be reconstructed from the cord word bit lengths, given in
 * a non-decreasing order, together with the symbols in a correlated array.
 * 
 * @param frequency
 */
public void doRoundTripTest(final int[] frequency) {
  
  final DecoderInputs decoderInputs = new DecoderInputs();
  
  final HuffmanCodec codec = new HuffmanCodec(frequency, decoderInputs);
  if (log.isDebugEnabled()) {
    log.debug(printCodeBook(codec.codeWords()) + "\nlength[]="
        + Arrays.toString(decoderInputs.getLengths()) + "\nsymbol[]="
        + Arrays.toString(decoderInputs.getSymbols()));
  }
  
  final CanonicalFast64CodeWordDecoder actualDecoder = new CanonicalFast64CodeWordDecoder(
      decoderInputs.getLengths(), decoderInputs.getSymbols());
  for (int i = 0; i < frequency.length; i++) {
    final BooleanIterator coded = codec.coder().encode(i/*symbol*/);
    
    assertEquals(i, actualDecoder.decode(coded));
    
  }
}
origin: blazegraph/database

decoderInputs = new DecoderInputs();
origin: com.blazegraph/bigdata-core

decoderInputs = new DecoderInputs();
origin: com.blazegraph/bigdata-core-test

final DecoderInputs decoderInputs = new DecoderInputs();
origin: blazegraph/database

final DecoderInputs decoderInputs = new DecoderInputs();
origin: com.blazegraph/bigdata-core-test

/**
 * This verifies that a code book constructed from a given set of
 * frequencies may be reconstructed from the cord word bit lengths, given in
 * a non-decreasing order, together with the symbols in a correlated array.
 * 
 * @param frequency
 */
public void doRoundTripTest(final int[] frequency) {
  
  final DecoderInputs decoderInputs = new DecoderInputs();
  
  final HuffmanCodec codec = new HuffmanCodec(frequency, decoderInputs);
  if (log.isDebugEnabled()) {
    log.debug(printCodeBook(codec.codeWords()) + "\nlength[]="
        + Arrays.toString(decoderInputs.getLengths()) + "\nsymbol[]="
        + Arrays.toString(decoderInputs.getSymbols()));
  }
  
  final CanonicalFast64CodeWordDecoder actualDecoder = new CanonicalFast64CodeWordDecoder(
      decoderInputs.getLengths(), decoderInputs.getSymbols());
  for (int i = 0; i < frequency.length; i++) {
    final BooleanIterator coded = codec.coder().encode(i/*symbol*/);
    
    assertEquals(i, actualDecoder.decode(coded));
    
  }
}
origin: blazegraph/database

/** Creates a new Huffman codec using the given vector of frequencies.
 * 
 * @param frequency a vector of nonnnegative frequencies.
 */
public HuffmanCodec( final int[] frequency ) {

  this(frequency, new DecoderInputs());
  
}
origin: com.blazegraph/dsi-utils

/** Creates a new Huffman codec using the given vector of frequencies.
 * 
 * @param frequency a vector of nonnnegative frequencies.
 */
public HuffmanCodec( final int[] frequency ) {

  this(frequency, new DecoderInputs());
  
}
it.unimi.dsi.compressionHuffmanCodec$DecoderInputs<init>

Javadoc

Ctor may be passed to HuffmanCodec to obtain the assigned length[] and symbol[] data and the shortest code word.

Popular methods of HuffmanCodec$DecoderInputs

  • getLengths
    Return the codeWord bit lengths in the non-decreasing order used to construct the CanonicalFast64Cod
  • getShortestCodeWord
    The shortest code word. Note that canonical huffman codes can be recreated from just length[0] and t
  • getSymbols
    Return the symbol[] in the permuted order used to construct the CanonicalFast64CodeWordDecoder. This

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Best IntelliJ 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