commandline.flatFileToBinaryPackage
Class HuffmanFlatToBin

java.lang.Object
  extended by commandline.flatFileToBinaryPackage.AbstractFlatToBin
      extended by commandline.flatFileToBinaryPackage.TreeCompressedCoder
          extended by commandline.flatFileToBinaryPackage.HuffmanFlatToBin

public class HuffmanFlatToBin
extends TreeCompressedCoder


Field Summary
 
Fields inherited from class commandline.flatFileToBinaryPackage.TreeCompressedCoder
configuration, PROB_SCALE_FACTOR
 
Fields inherited from class commandline.flatFileToBinaryPackage.AbstractFlatToBin
basemeshBits, metaBits, normalOffsetBits, normalOffsetGain, tesselationBits, tesselationGain, treeBits, treeGain, verticalOffsetBits, verticalOffsetGain
 
Constructor Summary
HuffmanFlatToBin(DataStructure dataStructure, CodedFile treeStucture, MyDataOutPutStream dos, Configuration configuration)
           
 
Method Summary
protected  double getLambdaEstimator()
           
protected  java.lang.String getMethodName()
           
protected  java.lang.String[] getNormalIndex(GenericEdge e)
          TEMPLATE METHOD this method can be overriden by another method for a better compression of the normal offset
 double getPEstimate()
          estimates the probability p that a vertical offsets belong to the dirac distribution at zero
protected  java.lang.String[] getVerticalIndex(int verticalOffset, GenericEdge genericEdge)
          method giving back
protected  void writeMetaData(java.util.ArrayList<java.lang.String> verticaloffsetbits)
          writes the number of bits spend on vertical offsets to an Integer Value on the bitstream
 
Methods inherited from class commandline.flatFileToBinaryPackage.TreeCompressedCoder
writeNormalOffsets, writeOffsets, writeTesselations, writeVerticalOffsets
 
Methods inherited from class commandline.flatFileToBinaryPackage.AbstractFlatToBin
convert, getBasemeshBits, getBreathFirstDatastructure, getDos, getMetaBits, getNormalOffsetBits, getNormalOffsetGain, getTesselationBits, getTesselationGain, getTreeBits, getTreeGain, getTreeStructure, getVerticalOffsetBits, getVerticalOffsetGain, printCharArray, printStringArray, printto, writeArrayListOfBitStringsToBytes, writeBitSetToBytes, writeBitSetToBytes, writeByteArray, writeMyFloat, writeMyInt, writeMyShort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HuffmanFlatToBin

public HuffmanFlatToBin(DataStructure dataStructure,
                        CodedFile treeStucture,
                        MyDataOutPutStream dos,
                        Configuration configuration)
Method Detail

getPEstimate

public double getPEstimate()
estimates the probability p that a vertical offsets belong to the dirac distribution at zero


writeMetaData

protected void writeMetaData(java.util.ArrayList<java.lang.String> verticaloffsetbits)
writes the number of bits spend on vertical offsets to an Integer Value on the bitstream

Overrides:
writeMetaData in class TreeCompressedCoder

getNormalIndex

protected java.lang.String[] getNormalIndex(GenericEdge e)
Description copied from class: TreeCompressedCoder
TEMPLATE METHOD this method can be overriden by another method for a better compression of the normal offset

Specified by:
getNormalIndex in class TreeCompressedCoder

getVerticalIndex

protected java.lang.String[] getVerticalIndex(int verticalOffset,
                                              GenericEdge genericEdge)
method giving back

Specified by:
getVerticalIndex in class TreeCompressedCoder
Returns:
The Huffman codeword for the vertical offset position Huffman(verticaloffset, [-255,255])

getMethodName

protected java.lang.String getMethodName()
Specified by:
getMethodName in class TreeCompressedCoder

getLambdaEstimator

protected double getLambdaEstimator()
Returns:
The estimation of the parameter \lambda_streep of the Laplace distribution as 1/mean(abs(v_o))